Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtitles #7

Open
igordrangel opened this issue Feb 15, 2021 · 1 comment
Open

Subtitles #7

igordrangel opened this issue Feb 15, 2021 · 1 comment

Comments

@igordrangel
Copy link

Hi, i'm testing this plugin and need put subtitles, but i'm not find this feature.

@minhdev2017
Copy link

I try add subtitles on java code but not working
anyone can help me pls

`val tracks: ArrayList = ArrayList()
val englishSubtitle = MediaTrack.Builder(1 /* ID /,
MediaTrack.TYPE_TEXT)
.setName("English Subtitle")
.setSubtype(MediaTrack.SUBTYPE_SUBTITLES)
.setContentId(sub) /
language is required for subtitle type but optional otherwise */
.setLanguage("en-US")
.build()

        tracks.add(englishSubtitle);
        
        val media = MediaInfo.Builder(url)
                .setMediaTracks(tracks).build()
        val options = MediaLoadOptions.Builder().build()
        val request = sessionManager?.currentCastSession?.remoteMediaClient?.load(media, options)
        request?.addStatusListener(this)`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants