mirror of
https://github.com/jellyfin/jellyfin-android.git
synced 2026-10-26 16:45:26 +00:00
Address review feedback
This commit is contained in:
1 parent
819ca4723a
commit
6388e77fdd
2 files changed
+11
-4
No files matched your search
@@ -141,8 +141,8 @@ export class ExternalPlayerPlugin {
|
||||
async getDeviceProfile() {
|
||||
return {
|
||||
Name: 'Android External Player Stub',
|
||||
MaxStreamingBitrate: 1000000000,
|
||||
MaxStaticBitrate: 1000000000,
|
||||
MaxStreamingBitrate: 1_000_000_000,
|
||||
MaxStaticBitrate: 1_000_000_000,
|
||||
DirectPlayProfiles: [{Type: 'Video'}, {Type: 'Audio'}],
|
||||
CodecProfiles: [],
|
||||
SubtitleProfiles: [{Method: 'Embed'}, {Method: 'Drop'}],
|
||||
|
||||
@@ -167,8 +167,7 @@ class ExternalPlayer(
|
||||
}
|
||||
|
||||
private fun notifyEvent(event: String, parameters: String = "") {
|
||||
val allowedEvents = arrayOf(Constants.EVENT_CANCELED, Constants.EVENT_ENDED, Constants.EVENT_TIME_UPDATE)
|
||||
if (event in allowedEvents && parameters.isDigitsOnly()) {
|
||||
if (event in ALLOWED_EVENTS && parameters.isDigitsOnly()) {
|
||||
webappFunctionChannel.call("window.ExtPlayer.notify$event($parameters)")
|
||||
}
|
||||
}
|
||||
@@ -302,4 +301,12 @@ class ExternalPlayer(
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val ALLOWED_EVENTS = arrayOf(
|
||||
Constants.EVENT_CANCELED,
|
||||
Constants.EVENT_ENDED,
|
||||
Constants.EVENT_TIME_UPDATE,
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user