Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

HTML Player with option to choose between two different languages.

I want a HTML Player to play videos but with the option to choose between two different languages. Is it possible?

When you say choosing between two different languages, do you mean the audio tracks or captions?

Audio Track

1 Answer

Question is a bit unclear, so here it goes....

I'm pretty sure you want a JavaScript option for that. The default for the <video> tag does just that; it displays a video for the webpage based on default settings. The video/audio HTML course goes over what I'm talking about here, so it may be worth checking out. The JavaScript option would be able to fix the features of the player to whatever you want them to be, but if you want LANGUAGE options, you essentially only two real choices.

1) Record the video with the dubbed language in the first place. Give the end user the chance to load either video upon command.

2) make a subtitle [.vtt file] and include it as a <track> option. You hae to type the transcription yourself though.

Hope that helps. But seriously, check out the video/audio track.