Reputation: 4313
I'm developing an app which I need to stream video captured from the Smartphone's video camera (on iPhones and Android phones) directly to YouTube Live.
I looked into Codename One's Capture.captureVideo(ActionListener response) method which must wait for the video to be stopped, the file to be saved, and then the ActionListener is called. Obviously, this can't work work because the video has to be streamed to an output stream (to an URL given by YouTube Live API) on a continuous basis. Is there any other way to accomplish this? (What about any unofficial API, like method to override, to get the input stream from the camera?) If not, would Codename One consider providing this feature for a version upgrade as the market trend seems to be moving on live video streaming apps?
If it cannot be done with Codename One's API, then the only way is to write native code for Android and iOS. I've read the article integrating native API and using Freshdesk API as an example, so any pointers on how to integrate YouTube API for the purpose of streaming live video?
https://developers.google.com/youtube/v3/live/getting-started
https://developers.google.com/youtube/v3/live/libraries
https://developers.google.com/api-client-library/java/apis/youtube/v3
https://developers.google.com/youtube/v3/live/code_samples/
Upvotes: 2
Views: 530
Reputation: 52725
I don't see a REST API within the list of API's although there is a JavaScript API which you might use to implement this. Alternatively you can use something like was done with the freshdesk API. You will need to embed the native view from the live broadcast, you can look at the implementation of Google Maps to see how we embedded that native widget.
Upvotes: 1