Skip to content

Commit

Permalink
[Vimeo] Fixed Android's json doesn't implements Iterable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Udhayarajan committed Jan 20, 2023
1 parent 3094f84 commit babaee2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/commonMain/kotlin/com/mugames/vidsnapkit/extractor/Vimeo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ class Vimeo internal constructor(url: String) : Extractor(url) {
)

fun extractVideoData() {
videoArray.forEach {
for (i in 0 until videoArray.length()) {
val it = videoArray.get(i)
if (it !is JSONObject)
return@forEach
continue
val (videoUrl, mime) = getUrlAndMimeFromObject(it)
formats.videoData.add(
VideoResource(
Expand All @@ -111,9 +112,10 @@ class Vimeo internal constructor(url: String) : Extractor(url) {
}

fun extractAudioData() {
audioArray.forEach {
for (i in 0 until audioArray.length()) {
val it = audioArray.get(i)
if (it !is JSONObject)
return@forEach
continue
val (audioUrl, mime) = getUrlAndMimeFromObject(it)
formats.audioData.add(
AudioResource(
Expand Down

0 comments on commit babaee2

Please sign in to comment.