Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
hugetv
Level 7

two AudioLanguageSelected

This code is corecto

mediaItem.AudioLanguageSelected = "eng esp"
Our system http://www.rokumanager.com
0 Kudos
6 Replies
hugetv
Level 7

Re: two AudioLanguageSelected

help pliss
Our system http://www.rokumanager.com
0 Kudos
Roku Employee
Roku Employee

Re: two AudioLanguageSelected

"An ISO-639 3-letter language code. If multiple language tracks are available in the content, this specifies the one that should be used."

https://www.loc.gov/standards/iso639-2/ ... e_list.php

so I would presume to select English you would have mediaItem.AudioLanguageSelected ="eng" for English and mediaItem.AudioLanguageSelected = "spa" for Spanish.

- Joel
0 Kudos
Roku Employee
Roku Employee

Re: two AudioLanguageSelected

"hugetv" wrote:
This code is corecto

mediaItem.AudioLanguageSelected = "eng esp"


Only one value can be specified, although it seems like an interesting feature request to be able to specify multiple as fallbacks.
0 Kudos
hugetv
Level 7

Re: two AudioLanguageSelected

this corect

vid_to_play = {
Stream: { url: stream_url }
StreamFormat: episode.StreamFormat
Title: episode.title
SubtitleConfig: episode.SubtitleConfig
SwitchingStrategy: "full-adaptation"
Watched: "True"
Live: episode.Live
AudioLanguageSelected: "eng"
AudioLanguageSelected: "spa"
}

to use an example like the picture
Our system http://www.rokumanager.com
0 Kudos
Roku Employee
Roku Employee

Re: two AudioLanguageSelected

"hugetv" wrote:

vid_to_play = {
Stream: { url: stream_url }
StreamFormat: episode.StreamFormat
Title: episode.title
SubtitleConfig: episode.SubtitleConfig
SwitchingStrategy: "full-adaptation"
Watched: "True"
Live: episode.Live
AudioLanguageSelected: "eng"
AudioLanguageSelected: "spa"
}


In this example, vid_to_play.AudioLanguageSelected is equal to "spa" after the object assignment.

That is, assigning a value to a key twice (or more) just results in the last assigned value being kept.

It doesn't make it a list of values, if that was the intent.
0 Kudos
hugetv
Level 7

Re: two AudioLanguageSelected

this luck

Our system http://www.rokumanager.com
0 Kudos