You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see and as you know it gets the streams from a local json file named "media.exolist.json".Everything is good about streams and works perfectly fine,but I also want to get subtitle URL from that json file and merge that subtitle to related stream.For example,it will be something like this
You can sideload text tracks with a MergingMediaSource. The developer guide has a section about sideloading text tracks which describes how you can achieve this.
You are right that there is no such example in the demo app. If you want to adapt this for your app you need to add the property to one of the subclasses of SampleChooserActivity.Sample and include the subtitle property in the intent extras like the other properties. The intent needs then to be consumed in the PlayerActivity where you can read the subtitle property out of the extras of the intent and create a merging data source with it.
ojw28
changed the title
Question about loading subtitles from local json
Demo app: Allow specifying separate subtitle file (e.g. in exolist.json files)
Mar 6, 2019
Hi,I'm trying to test my streams using the demo application and the guide which you can reach through this link
https://google.github.io/ExoPlayer/demo-application.html
As you can see and as you know it gets the streams from a local json file named "media.exolist.json".Everything is good about streams and works perfectly fine,but I also want to get subtitle URL from that json file and merge that subtitle to related stream.For example,it will be something like this
{
"name": "My Test Stream",
"uri": "https://testtest.mpd",
"drm_scheme": "widevine",
"drm_license_url": "https://testtest.com"
"subtitle":" "http://subtitledomain.com/test.vtt"
},
So,how can I do it by changing demo codes ? If you can help me about this I'd be more than happy.
The text was updated successfully, but these errors were encountered: