Use newly available core.setPreferredVideoDefinitionByName method

This commit is contained in:
Sylvain Berfini 2020-09-17 16:32:39 +02:00
parent 2dc7a2aaea
commit f3e3b9642a
2 changed files with 2 additions and 2 deletions

View file

@ -153,7 +153,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "androidx.media:media:1.1.0"
implementation 'androidx.media:media:1.1.0'
implementation 'androidx.fragment:fragment-ktx:1.2.5'
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'

View file

@ -73,7 +73,7 @@ class VideoSettingsViewModel : GenericSettingsViewModel() {
val videoSizeListener = object : SettingListenerStub() {
override fun onListValueChanged(position: Int) {
core.setPreferredVideoDefinition(Factory.instance().createVideoDefinitionFromName(videoSizeLabels.value.orEmpty()[position]))
core.setPreferredVideoDefinitionByName(videoSizeLabels.value.orEmpty()[position])
}
}
val videoSizeIndex = MutableLiveData<Int>()