-
Notifications
You must be signed in to change notification settings - Fork 49
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 #494 from vimeo/progressive-to-download
Support download property on Video
- Loading branch information
Showing
16 changed files
with
172 additions
and
210 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@file:JvmName("BillingUtils") | ||
|
||
package com.vimeo.networking2 | ||
|
||
import com.squareup.moshi.Json | ||
|
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
75 changes: 75 additions & 0 deletions
75
models/src/main/java/com/vimeo/networking2/DownloadableVideoFile.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,75 @@ | ||
@file:JvmName("DownloadableVideoFileUtils") | ||
|
||
package com.vimeo.networking2 | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
import com.vimeo.networking2.common.VideoFile | ||
import com.vimeo.networking2.enums.VideoQualityType | ||
import com.vimeo.networking2.enums.VideoSourceType | ||
import com.vimeo.networking2.enums.asEnum | ||
import java.util.Date | ||
|
||
/** | ||
* A downloadable video file. | ||
* | ||
* @param publicName A name describing the file, suitable for display. | ||
* @param size The size of the file, in bytes. | ||
* @param sizeShort A short description of the file size, accurate to two decimal places. | ||
* @param md5 The MD5 hash of the file. | ||
* @param width The width of the video content, in pixels. | ||
* @param height The height of the video content, in pixels. | ||
* @param videoQuality The quality of the video file. See [qualityType]. | ||
* @param fps The FPS of the video file. | ||
* @param rawType The type of the video file. See [type]. | ||
*/ | ||
@JsonClass(generateAdapter = true) | ||
data class DownloadableVideoFile( | ||
|
||
@Json(name = "public_name") | ||
val publicName: String? = null, | ||
|
||
@Json(name = "size") | ||
val size: Long? = null, | ||
|
||
@Json(name = "size_short") | ||
val sizeShort: String? = null, | ||
|
||
@Json(name = "md5") | ||
val md5: String? = null, | ||
|
||
@Json(name = "link") | ||
override val link: String? = null, | ||
|
||
@Json(name = "width") | ||
val width: Int? = null, | ||
|
||
@Json(name = "height") | ||
val height: Int? = null, | ||
|
||
@Json(name = "quality") | ||
val videoQuality: String? = null, | ||
|
||
@Json(name = "expires") | ||
override val linkExpirationTime: Date? = null, | ||
|
||
@Json(name = "fps") | ||
val fps: Double? = null, | ||
|
||
@Json(name = "type") | ||
val rawType: String? = null | ||
) : VideoFile | ||
|
||
/** | ||
* @see DownloadableVideoFile.videoQuality | ||
* @see VideoQualityType | ||
*/ | ||
val DownloadableVideoFile.qualityType: VideoQualityType | ||
get() = videoQuality.asEnum(VideoQualityType.UNKNOWN) | ||
|
||
/** | ||
* @see DownloadableVideoFile.rawType | ||
* @see VideoSourceType | ||
*/ | ||
val DownloadableVideoFile.type: VideoSourceType | ||
get() = rawType.asEnum(VideoSourceType.UNKNOWN) |
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
2 changes: 1 addition & 1 deletion
2
models/src/main/java/com/vimeo/networking2/ProgrammedContentItem.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@file:JvmName("CinemaUtils") | ||
@file:JvmName("ProgrammedContentItemUtils") | ||
|
||
package com.vimeo.networking2 | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@file:JvmName("TeamMembershipUtils") | ||
|
||
package com.vimeo.networking2 | ||
|
||
import com.squareup.moshi.Json | ||
|
Oops, something went wrong.