-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #452 from THEOplayer/release/v8.9.0
Release/v8.9.0
- Loading branch information
Showing
32 changed files
with
551 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
android/src/main/java/com/theoplayer/latency/LatencyConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.theoplayer.latency | ||
|
||
import com.theoplayer.android.api.latency.LatencyConfiguration | ||
import org.json.JSONObject | ||
|
||
private const val PROP_MINIMUM_OFFSET = "minimumOffset" | ||
private const val PROP_MAXIMUM_OFFSET = "maximumOffset" | ||
private const val PROP_TARGET_OFFSET = "targetOffset" | ||
private const val PROP_FORCE_SEEK_OFFSET = "forceSeekOffset" | ||
private const val PROP_MINIMUM_PLAYBACK_RATE = "minimumPlaybackRate" | ||
private const val PROP_MAXIMUM_PLAYBACK_RATE = "maximumPlaybackRate" | ||
|
||
fun parseLatencyConfiguration(jsonLatency: JSONObject): LatencyConfiguration { | ||
return LatencyConfiguration.Builder().apply { | ||
setMinimumOffset(jsonLatency.optDouble(PROP_MINIMUM_OFFSET)) | ||
setMaximumOffset(jsonLatency.optDouble(PROP_MAXIMUM_OFFSET)) | ||
setTargetOffset(jsonLatency.optDouble(PROP_TARGET_OFFSET)) | ||
setForceSeekOffset(jsonLatency.optDouble(PROP_FORCE_SEEK_OFFSET)) | ||
setMinimumPlaybackRate(jsonLatency.optDouble(PROP_MINIMUM_PLAYBACK_RATE)) | ||
setMaximumPlaybackRate(jsonLatency.optDouble(PROP_MAXIMUM_PLAYBACK_RATE)) | ||
}.build() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.