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

Add support for subtitles on Chromecast #1165

Merged
merged 1 commit into from
Jun 26, 2018

Conversation

janza
Copy link
Contributor

@janza janza commented Apr 27, 2017

Support subtitles on Chromecast by creating a new http server for selected subtitles before calling player.play()

Closes #530

@talarari
Copy link

any update on this? i love the player but i usually cast my videos and not having subtitles is kind of a deal breaker, so this would be awesome

Copy link

@Rikunaatti Rikunaatti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, important feature

cb()
} else {
ret.subServer = http.createServer((req, res) => {
if (!selectedSubtitle) {
Copy link
Contributor

@jonkoops jonkoops Sep 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this code will ever be reached because selectedSubtile has already been checked for a value in the above if clause.

@@ -130,22 +132,51 @@ function chromecastPlayer () {
})
}

function serveSubtitles (cb) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all functions in this file callback arguments are called callback, probably best to keep this consistent.

state.playing.location = 'chromecast'
}
update()
serveSubtitles(function (subtitles) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the subtitles variable is not actually an array of subtitles it makes more sense to use the same name as used before in the serveSubtitles function - namely subtitlesUrl.

@paulogr
Copy link

paulogr commented Feb 16, 2018

Hi all! Would be amazing to have this PR merged!!!

@feross
Copy link
Member

feross commented Feb 16, 2018

This looks like a useful PR. Will find a Chromecast to test it on as soon as I can

@gonzaloserrano
Copy link

Any update on this?

@gonzaloserrano
Copy link

Hey there, I built the master branch and cherry-picked janza@2508701 and it works!

@paulogr
Copy link

paulogr commented Jun 13, 2018

Just did the same here like @gonzaloserrano did, and it worked for me too!

Nice job @janza!

@feross Any change to merge this PR?

@jonkoops
Copy link
Contributor

I've tested this PR and it seems to work on both my Phillips TV's built-in Chromecast, a Chromecast Gen. 1, and the Chromecast Ultra without any problems.

Copy link
Member

@Borewit Borewit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On behalf of all the friendly folks who reviewed this change I I will approve this change. First of all, thanks a lot for all that work! I do not have Chromecast device myself so I completely rely on you folks.

@Borewit Borewit merged commit e0de30b into webtorrent:master Jun 26, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants