Regenerated Pigeon code
This commit is contained in:
parent
3861a0f144
commit
1a5dbbbed6
27 changed files with 2528 additions and 1797 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -27,13 +27,13 @@ fun getFlutterAdBreakStatus(adBreakStatus: AdBreakStatus?): PlatformBridgeApis.A
|
||||||
|
|
||||||
fun getFlutterPlayerState(playerStateRaw: Int?): PlatformBridgeApis.PlayerState {
|
fun getFlutterPlayerState(playerStateRaw: Int?): PlatformBridgeApis.PlayerState {
|
||||||
return when (playerStateRaw) {
|
return when (playerStateRaw) {
|
||||||
MediaStatus.PLAYER_STATE_UNKNOWN -> PlatformBridgeApis.PlayerState.unknown
|
MediaStatus.PLAYER_STATE_UNKNOWN -> PlatformBridgeApis.PlayerState.UNKNOWN
|
||||||
MediaStatus.PLAYER_STATE_BUFFERING -> PlatformBridgeApis.PlayerState.buffering
|
MediaStatus.PLAYER_STATE_BUFFERING -> PlatformBridgeApis.PlayerState.BUFFERING
|
||||||
MediaStatus.PLAYER_STATE_IDLE -> PlatformBridgeApis.PlayerState.idle
|
MediaStatus.PLAYER_STATE_IDLE -> PlatformBridgeApis.PlayerState.IDLE
|
||||||
MediaStatus.PLAYER_STATE_LOADING -> PlatformBridgeApis.PlayerState.loading
|
MediaStatus.PLAYER_STATE_LOADING -> PlatformBridgeApis.PlayerState.LOADING
|
||||||
MediaStatus.PLAYER_STATE_PAUSED -> PlatformBridgeApis.PlayerState.paused
|
MediaStatus.PLAYER_STATE_PAUSED -> PlatformBridgeApis.PlayerState.PAUSED
|
||||||
MediaStatus.PLAYER_STATE_PLAYING -> PlatformBridgeApis.PlayerState.playing
|
MediaStatus.PLAYER_STATE_PLAYING -> PlatformBridgeApis.PlayerState.PLAYING
|
||||||
else -> PlatformBridgeApis.PlayerState.unknown
|
else -> PlatformBridgeApis.PlayerState.UNKNOWN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -57,11 +57,11 @@ fun getFlutterMediaInfo(mediaInfo: MediaInfo?): PlatformBridgeApis.MediaInfo {
|
||||||
|
|
||||||
fun getFlutterStreamType(streamType: Int?): PlatformBridgeApis.StreamType {
|
fun getFlutterStreamType(streamType: Int?): PlatformBridgeApis.StreamType {
|
||||||
return when (streamType) {
|
return when (streamType) {
|
||||||
-1 -> PlatformBridgeApis.StreamType.invalid
|
-1 -> PlatformBridgeApis.StreamType.INVALID
|
||||||
0 -> PlatformBridgeApis.StreamType.none
|
0 -> PlatformBridgeApis.StreamType.NONE
|
||||||
1 -> PlatformBridgeApis.StreamType.buffered
|
1 -> PlatformBridgeApis.StreamType.BUFFERED
|
||||||
2 -> PlatformBridgeApis.StreamType.live
|
2 -> PlatformBridgeApis.StreamType.LIVE
|
||||||
else -> PlatformBridgeApis.StreamType.invalid
|
else -> PlatformBridgeApis.StreamType.INVALID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -107,24 +107,24 @@ fun getFlutterAdBreakClipInfo(adBreakClipInfo: AdBreakClipInfo?): PlatformBridge
|
||||||
|
|
||||||
fun getFlutterType(type: Int?): PlatformBridgeApis.TrackType {
|
fun getFlutterType(type: Int?): PlatformBridgeApis.TrackType {
|
||||||
return when (type) {
|
return when (type) {
|
||||||
0 -> PlatformBridgeApis.TrackType.unknown
|
0 -> PlatformBridgeApis.TrackType.UNKNOWN
|
||||||
1 -> PlatformBridgeApis.TrackType.text
|
1 -> PlatformBridgeApis.TrackType.TEXT
|
||||||
2 -> PlatformBridgeApis.TrackType.audio
|
2 -> PlatformBridgeApis.TrackType.AUDIO
|
||||||
3 -> PlatformBridgeApis.TrackType.video
|
3 -> PlatformBridgeApis.TrackType.VIDEO
|
||||||
else -> PlatformBridgeApis.TrackType.unknown
|
else -> PlatformBridgeApis.TrackType.UNKNOWN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getFlutterSubtype(subtype: Int?): PlatformBridgeApis.TrackSubtype {
|
fun getFlutterSubtype(subtype: Int?): PlatformBridgeApis.TrackSubtype {
|
||||||
return when (subtype) {
|
return when (subtype) {
|
||||||
-1 -> PlatformBridgeApis.TrackSubtype.unknown
|
-1 -> PlatformBridgeApis.TrackSubtype.UNKNOWN
|
||||||
0 -> PlatformBridgeApis.TrackSubtype.none
|
0 -> PlatformBridgeApis.TrackSubtype.NONE
|
||||||
1 -> PlatformBridgeApis.TrackSubtype.subtitles
|
1 -> PlatformBridgeApis.TrackSubtype.SUBTITLES
|
||||||
2 -> PlatformBridgeApis.TrackSubtype.captions
|
2 -> PlatformBridgeApis.TrackSubtype.CAPTIONS
|
||||||
3 -> PlatformBridgeApis.TrackSubtype.descriptions
|
3 -> PlatformBridgeApis.TrackSubtype.DESCRIPTIONS
|
||||||
4 -> PlatformBridgeApis.TrackSubtype.chapters
|
4 -> PlatformBridgeApis.TrackSubtype.CHAPTERS
|
||||||
5 -> PlatformBridgeApis.TrackSubtype.metadata
|
5 -> PlatformBridgeApis.TrackSubtype.METADATA
|
||||||
else -> PlatformBridgeApis.TrackSubtype.unknown
|
else -> PlatformBridgeApis.TrackSubtype.UNKNOWN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -150,14 +150,14 @@ fun getFlutterWebImages(images: List<WebImage>?): List<PlatformBridgeApis.WebIma
|
||||||
|
|
||||||
fun getFlutterMediaType(mediaType: Int?): PlatformBridgeApis.MediaType {
|
fun getFlutterMediaType(mediaType: Int?): PlatformBridgeApis.MediaType {
|
||||||
return when (mediaType) {
|
return when (mediaType) {
|
||||||
0 -> PlatformBridgeApis.MediaType.generic
|
0 -> PlatformBridgeApis.MediaType.GENERIC
|
||||||
1 -> PlatformBridgeApis.MediaType.movie
|
1 -> PlatformBridgeApis.MediaType.MOVIE
|
||||||
2 -> PlatformBridgeApis.MediaType.tvShow
|
2 -> PlatformBridgeApis.MediaType.TV_SHOW
|
||||||
3 -> PlatformBridgeApis.MediaType.musicTrack
|
3 -> PlatformBridgeApis.MediaType.MUSIC_TRACK
|
||||||
4 -> PlatformBridgeApis.MediaType.photo
|
4 -> PlatformBridgeApis.MediaType.PHOTO
|
||||||
5 -> PlatformBridgeApis.MediaType.audiobookChapter
|
5 -> PlatformBridgeApis.MediaType.AUDIOBOOK_CHAPTER
|
||||||
100 -> PlatformBridgeApis.MediaType.user
|
100 -> PlatformBridgeApis.MediaType.USER
|
||||||
else -> PlatformBridgeApis.MediaType.generic
|
else -> PlatformBridgeApis.MediaType.GENERIC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,34 +168,34 @@ fun getFlutterStrings(mediaMetadata: MediaMetadata?): Map<String, String> {
|
||||||
|
|
||||||
fun getFlutterMediaMetadataKey(mediaMetadataKey: String): String {
|
fun getFlutterMediaMetadataKey(mediaMetadataKey: String): String {
|
||||||
return when (mediaMetadataKey) {
|
return when (mediaMetadataKey) {
|
||||||
"com.google.android.gms.cast.metadata.ALBUM_ARTIST" -> PlatformBridgeApis.MediaMetadataKey.albumArtist.name
|
"com.google.android.gms.cast.metadata.ALBUM_ARTIST" -> PlatformBridgeApis.MediaMetadataKey.ALBUM_ARTIST.name
|
||||||
"com.google.android.gms.cast.metadata.ALBUM_TITLE" -> PlatformBridgeApis.MediaMetadataKey.albumTitle.name
|
"com.google.android.gms.cast.metadata.ALBUM_TITLE" -> PlatformBridgeApis.MediaMetadataKey.ALBUM_TITLE.name
|
||||||
"com.google.android.gms.cast.metadata.ARTIST" -> PlatformBridgeApis.MediaMetadataKey.artist.name
|
"com.google.android.gms.cast.metadata.ARTIST" -> PlatformBridgeApis.MediaMetadataKey.ARTIST.name
|
||||||
"com.google.android.gms.cast.metadata.BOOK_TITLE" -> PlatformBridgeApis.MediaMetadataKey.bookTitle.name
|
"com.google.android.gms.cast.metadata.BOOK_TITLE" -> PlatformBridgeApis.MediaMetadataKey.BOOK_TITLE.name
|
||||||
"com.google.android.gms.cast.metadata.BROADCAST_DATE" -> PlatformBridgeApis.MediaMetadataKey.broadcastDate.name
|
"com.google.android.gms.cast.metadata.BROADCAST_DATE" -> PlatformBridgeApis.MediaMetadataKey.BROADCAST_DATE.name
|
||||||
"com.google.android.gms.cast.metadata.CHAPTER_NUMBER" -> PlatformBridgeApis.MediaMetadataKey.chapterNumber.name
|
"com.google.android.gms.cast.metadata.CHAPTER_NUMBER" -> PlatformBridgeApis.MediaMetadataKey.CHAPTER_NUMBER.name
|
||||||
"com.google.android.gms.cast.metadata.CHAPTER_TITLE" -> PlatformBridgeApis.MediaMetadataKey.chapterTitle.name
|
"com.google.android.gms.cast.metadata.CHAPTER_TITLE" -> PlatformBridgeApis.MediaMetadataKey.CHAPTER_TITLE.name
|
||||||
"com.google.android.gms.cast.metadata.COMPOSER" -> PlatformBridgeApis.MediaMetadataKey.composer.name
|
"com.google.android.gms.cast.metadata.COMPOSER" -> PlatformBridgeApis.MediaMetadataKey.COMPOSER.name
|
||||||
"com.google.android.gms.cast.metadata.CREATION_DATE" -> PlatformBridgeApis.MediaMetadataKey.creationDate.name
|
"com.google.android.gms.cast.metadata.CREATION_DATE" -> PlatformBridgeApis.MediaMetadataKey.CREATION_DATE.name
|
||||||
"com.google.android.gms.cast.metadata.DISC_NUMBER" -> PlatformBridgeApis.MediaMetadataKey.discNumber.name
|
"com.google.android.gms.cast.metadata.DISC_NUMBER" -> PlatformBridgeApis.MediaMetadataKey.DISC_NUMBER.name
|
||||||
"com.google.android.gms.cast.metadata.EPISODE_NUMBER" -> PlatformBridgeApis.MediaMetadataKey.episodeNumber.name
|
"com.google.android.gms.cast.metadata.EPISODE_NUMBER" -> PlatformBridgeApis.MediaMetadataKey.EPISODE_NUMBER.name
|
||||||
"com.google.android.gms.cast.metadata.HEIGHT" -> PlatformBridgeApis.MediaMetadataKey.height.name
|
"com.google.android.gms.cast.metadata.HEIGHT" -> PlatformBridgeApis.MediaMetadataKey.HEIGHT.name
|
||||||
"com.google.android.gms.cast.metadata.LOCATION_LATITUDE" -> PlatformBridgeApis.MediaMetadataKey.locationLatitude.name
|
"com.google.android.gms.cast.metadata.LOCATION_LATITUDE" -> PlatformBridgeApis.MediaMetadataKey.LOCATION_LATITUDE.name
|
||||||
"com.google.android.gms.cast.metadata.LOCATION_LONGITUDE" -> PlatformBridgeApis.MediaMetadataKey.locationLongitude.name
|
"com.google.android.gms.cast.metadata.LOCATION_LONGITUDE" -> PlatformBridgeApis.MediaMetadataKey.LOCATION_LONGITUDE.name
|
||||||
"com.google.android.gms.cast.metadata.LOCATION_NAME" -> PlatformBridgeApis.MediaMetadataKey.locationName.name
|
"com.google.android.gms.cast.metadata.LOCATION_NAME" -> PlatformBridgeApis.MediaMetadataKey.LOCATION_NAME.name
|
||||||
"com.google.android.gms.cast.metadata.QUEUE_ITEM_ID" -> PlatformBridgeApis.MediaMetadataKey.queueItemId.name
|
"com.google.android.gms.cast.metadata.QUEUE_ITEM_ID" -> PlatformBridgeApis.MediaMetadataKey.QUEUE_ITEM_ID.name
|
||||||
"com.google.android.gms.cast.metadata.RELEASE_DATE" -> PlatformBridgeApis.MediaMetadataKey.releaseDate.name
|
"com.google.android.gms.cast.metadata.RELEASE_DATE" -> PlatformBridgeApis.MediaMetadataKey.RELEASE_DATE.name
|
||||||
"com.google.android.gms.cast.metadata.SEASON_NUMBER" -> PlatformBridgeApis.MediaMetadataKey.seasonNumber.name
|
"com.google.android.gms.cast.metadata.SEASON_NUMBER" -> PlatformBridgeApis.MediaMetadataKey.SEASON_NUMBER.name
|
||||||
"com.google.android.gms.cast.metadata.SECTION_DURATION" -> PlatformBridgeApis.MediaMetadataKey.sectionDuration.name
|
"com.google.android.gms.cast.metadata.SECTION_DURATION" -> PlatformBridgeApis.MediaMetadataKey.SECTION_DURATION.name
|
||||||
"com.google.android.gms.cast.metadata.SECTION_START_ABSOLUTE_TIME" -> PlatformBridgeApis.MediaMetadataKey.sectionStartAbsoluteTime.name
|
"com.google.android.gms.cast.metadata.SECTION_START_ABSOLUTE_TIME" -> PlatformBridgeApis.MediaMetadataKey.SECTION_START_ABSOLUTE_TIME.name
|
||||||
"com.google.android.gms.cast.metadata.SECTION_START_TIME_IN_CONTAINER" -> PlatformBridgeApis.MediaMetadataKey.sectionStartTimeInContainer.name
|
"com.google.android.gms.cast.metadata.SECTION_START_TIME_IN_CONTAINER" -> PlatformBridgeApis.MediaMetadataKey.SECTION_START_TIME_IN_CONTAINER.name
|
||||||
"com.google.android.gms.cast.metadata.SECTION_START_TIME_IN_MEDIA" -> PlatformBridgeApis.MediaMetadataKey.sectionStartTimeInMedia.name
|
"com.google.android.gms.cast.metadata.SECTION_START_TIME_IN_MEDIA" -> PlatformBridgeApis.MediaMetadataKey.SECTION_START_TIME_IN_MEDIA.name
|
||||||
"com.google.android.gms.cast.metadata.SERIES_TITLE" -> PlatformBridgeApis.MediaMetadataKey.seriesTitle.name
|
"com.google.android.gms.cast.metadata.SERIES_TITLE" -> PlatformBridgeApis.MediaMetadataKey.SERIES_TITLE.name
|
||||||
"com.google.android.gms.cast.metadata.STUDIO" -> PlatformBridgeApis.MediaMetadataKey.studio.name
|
"com.google.android.gms.cast.metadata.STUDIO" -> PlatformBridgeApis.MediaMetadataKey.STUDIO.name
|
||||||
"com.google.android.gms.cast.metadata.SUBTITLE" -> PlatformBridgeApis.MediaMetadataKey.subtitle.name
|
"com.google.android.gms.cast.metadata.SUBTITLE" -> PlatformBridgeApis.MediaMetadataKey.SUBTITLE.name
|
||||||
"com.google.android.gms.cast.metadata.TITLE" -> PlatformBridgeApis.MediaMetadataKey.title.name
|
"com.google.android.gms.cast.metadata.TITLE" -> PlatformBridgeApis.MediaMetadataKey.TITLE.name
|
||||||
"com.google.android.gms.cast.metadata.TRACK_NUMBER" -> PlatformBridgeApis.MediaMetadataKey.trackNumber.name
|
"com.google.android.gms.cast.metadata.TRACK_NUMBER" -> PlatformBridgeApis.MediaMetadataKey.TRACK_NUMBER.name
|
||||||
"com.google.android.gms.cast.metadata.WIDTH" -> PlatformBridgeApis.MediaMetadataKey.width.name
|
"com.google.android.gms.cast.metadata.WIDTH" -> PlatformBridgeApis.MediaMetadataKey.WIDTH.name
|
||||||
else -> mediaMetadataKey
|
else -> mediaMetadataKey
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,10 @@ fun getMediaInfo(mediaInfo: PlatformBridgeApis.MediaInfo?): MediaInfo? {
|
||||||
|
|
||||||
fun getStreamType(streamType: PlatformBridgeApis.StreamType): Int {
|
fun getStreamType(streamType: PlatformBridgeApis.StreamType): Int {
|
||||||
return when (streamType) {
|
return when (streamType) {
|
||||||
PlatformBridgeApis.StreamType.invalid -> -1
|
PlatformBridgeApis.StreamType.INVALID -> -1
|
||||||
PlatformBridgeApis.StreamType.none -> 0
|
PlatformBridgeApis.StreamType.NONE -> 0
|
||||||
PlatformBridgeApis.StreamType.buffered -> 1
|
PlatformBridgeApis.StreamType.BUFFERED -> 1
|
||||||
PlatformBridgeApis.StreamType.live -> 2
|
PlatformBridgeApis.StreamType.LIVE -> 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -77,46 +77,46 @@ fun getMediaMetadata(mediaMetadata: PlatformBridgeApis.MediaMetadata): MediaMeta
|
||||||
|
|
||||||
fun getMediaType(mediaType: PlatformBridgeApis.MediaType): Int {
|
fun getMediaType(mediaType: PlatformBridgeApis.MediaType): Int {
|
||||||
return when (mediaType) {
|
return when (mediaType) {
|
||||||
PlatformBridgeApis.MediaType.generic -> 0
|
PlatformBridgeApis.MediaType.GENERIC -> 0
|
||||||
PlatformBridgeApis.MediaType.movie -> 1
|
PlatformBridgeApis.MediaType.MOVIE -> 1
|
||||||
PlatformBridgeApis.MediaType.tvShow -> 2
|
PlatformBridgeApis.MediaType.TV_SHOW -> 2
|
||||||
PlatformBridgeApis.MediaType.musicTrack -> 3
|
PlatformBridgeApis.MediaType.MUSIC_TRACK -> 3
|
||||||
PlatformBridgeApis.MediaType.photo -> 4
|
PlatformBridgeApis.MediaType.PHOTO -> 4
|
||||||
PlatformBridgeApis.MediaType.audiobookChapter -> 5
|
PlatformBridgeApis.MediaType.AUDIOBOOK_CHAPTER -> 5
|
||||||
PlatformBridgeApis.MediaType.user -> 100
|
PlatformBridgeApis.MediaType.USER -> 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getMediaMetadataKey(mediaMetadataKey: String): String {
|
fun getMediaMetadataKey(mediaMetadataKey: String): String {
|
||||||
return when (mediaMetadataKey) {
|
return when (mediaMetadataKey) {
|
||||||
PlatformBridgeApis.MediaMetadataKey.albumArtist.name -> "com.google.android.gms.cast.metadata.ALBUM_ARTIST"
|
PlatformBridgeApis.MediaMetadataKey.ALBUM_ARTIST.name -> "com.google.android.gms.cast.metadata.ALBUM_ARTIST"
|
||||||
PlatformBridgeApis.MediaMetadataKey.albumTitle.name -> "com.google.android.gms.cast.metadata.ALBUM_TITLE"
|
PlatformBridgeApis.MediaMetadataKey.ALBUM_TITLE.name -> "com.google.android.gms.cast.metadata.ALBUM_TITLE"
|
||||||
PlatformBridgeApis.MediaMetadataKey.artist.name -> "com.google.android.gms.cast.metadata.ARTIST"
|
PlatformBridgeApis.MediaMetadataKey.ARTIST.name -> "com.google.android.gms.cast.metadata.ARTIST"
|
||||||
PlatformBridgeApis.MediaMetadataKey.bookTitle.name -> "com.google.android.gms.cast.metadata.BOOK_TITLE"
|
PlatformBridgeApis.MediaMetadataKey.BOOK_TITLE.name -> "com.google.android.gms.cast.metadata.BOOK_TITLE"
|
||||||
PlatformBridgeApis.MediaMetadataKey.broadcastDate.name -> "com.google.android.gms.cast.metadata.BROADCAST_DATE"
|
PlatformBridgeApis.MediaMetadataKey.BROADCAST_DATE.name -> "com.google.android.gms.cast.metadata.BROADCAST_DATE"
|
||||||
PlatformBridgeApis.MediaMetadataKey.chapterNumber.name -> "com.google.android.gms.cast.metadata.CHAPTER_NUMBER"
|
PlatformBridgeApis.MediaMetadataKey.CHAPTER_NUMBER.name -> "com.google.android.gms.cast.metadata.CHAPTER_NUMBER"
|
||||||
PlatformBridgeApis.MediaMetadataKey.chapterTitle.name -> "com.google.android.gms.cast.metadata.CHAPTER_TITLE"
|
PlatformBridgeApis.MediaMetadataKey.CHAPTER_TITLE.name -> "com.google.android.gms.cast.metadata.CHAPTER_TITLE"
|
||||||
PlatformBridgeApis.MediaMetadataKey.composer.name -> "com.google.android.gms.cast.metadata.COMPOSER"
|
PlatformBridgeApis.MediaMetadataKey.COMPOSER.name -> "com.google.android.gms.cast.metadata.COMPOSER"
|
||||||
PlatformBridgeApis.MediaMetadataKey.creationDate.name -> "com.google.android.gms.cast.metadata.CREATION_DATE"
|
PlatformBridgeApis.MediaMetadataKey.CREATION_DATE.name -> "com.google.android.gms.cast.metadata.CREATION_DATE"
|
||||||
PlatformBridgeApis.MediaMetadataKey.discNumber.name -> "com.google.android.gms.cast.metadata.DISC_NUMBER"
|
PlatformBridgeApis.MediaMetadataKey.DISC_NUMBER.name -> "com.google.android.gms.cast.metadata.DISC_NUMBER"
|
||||||
PlatformBridgeApis.MediaMetadataKey.episodeNumber.name -> "com.google.android.gms.cast.metadata.EPISODE_NUMBER"
|
PlatformBridgeApis.MediaMetadataKey.EPISODE_NUMBER.name -> "com.google.android.gms.cast.metadata.EPISODE_NUMBER"
|
||||||
PlatformBridgeApis.MediaMetadataKey.height.name -> "com.google.android.gms.cast.metadata.HEIGHT"
|
PlatformBridgeApis.MediaMetadataKey.HEIGHT.name -> "com.google.android.gms.cast.metadata.HEIGHT"
|
||||||
PlatformBridgeApis.MediaMetadataKey.locationLatitude.name -> "com.google.android.gms.cast.metadata.LOCATION_LATITUDE"
|
PlatformBridgeApis.MediaMetadataKey.LOCATION_LATITUDE.name -> "com.google.android.gms.cast.metadata.LOCATION_LATITUDE"
|
||||||
PlatformBridgeApis.MediaMetadataKey.locationLongitude.name -> "com.google.android.gms.cast.metadata.LOCATION_LONGITUDE"
|
PlatformBridgeApis.MediaMetadataKey.LOCATION_LONGITUDE.name -> "com.google.android.gms.cast.metadata.LOCATION_LONGITUDE"
|
||||||
PlatformBridgeApis.MediaMetadataKey.locationName.name -> "com.google.android.gms.cast.metadata.LOCATION_NAME"
|
PlatformBridgeApis.MediaMetadataKey.LOCATION_NAME.name -> "com.google.android.gms.cast.metadata.LOCATION_NAME"
|
||||||
PlatformBridgeApis.MediaMetadataKey.queueItemId.name -> "com.google.android.gms.cast.metadata.QUEUE_ITEM_ID"
|
PlatformBridgeApis.MediaMetadataKey.QUEUE_ITEM_ID.name -> "com.google.android.gms.cast.metadata.QUEUE_ITEM_ID"
|
||||||
PlatformBridgeApis.MediaMetadataKey.releaseDate.name -> "com.google.android.gms.cast.metadata.RELEASE_DATE"
|
PlatformBridgeApis.MediaMetadataKey.RELEASE_DATE.name -> "com.google.android.gms.cast.metadata.RELEASE_DATE"
|
||||||
PlatformBridgeApis.MediaMetadataKey.seasonNumber.name -> "com.google.android.gms.cast.metadata.SEASON_NUMBER"
|
PlatformBridgeApis.MediaMetadataKey.SEASON_NUMBER.name -> "com.google.android.gms.cast.metadata.SEASON_NUMBER"
|
||||||
PlatformBridgeApis.MediaMetadataKey.sectionDuration.name -> "com.google.android.gms.cast.metadata.SECTION_DURATION"
|
PlatformBridgeApis.MediaMetadataKey.SECTION_DURATION.name -> "com.google.android.gms.cast.metadata.SECTION_DURATION"
|
||||||
PlatformBridgeApis.MediaMetadataKey.sectionStartAbsoluteTime.name -> "com.google.android.gms.cast.metadata.SECTION_START_ABSOLUTE_TIME"
|
PlatformBridgeApis.MediaMetadataKey.SECTION_START_ABSOLUTE_TIME.name -> "com.google.android.gms.cast.metadata.SECTION_START_ABSOLUTE_TIME"
|
||||||
PlatformBridgeApis.MediaMetadataKey.sectionStartTimeInContainer.name -> "com.google.android.gms.cast.metadata.SECTION_START_TIME_IN_CONTAINER"
|
PlatformBridgeApis.MediaMetadataKey.SECTION_START_TIME_IN_CONTAINER.name -> "com.google.android.gms.cast.metadata.SECTION_START_TIME_IN_CONTAINER"
|
||||||
PlatformBridgeApis.MediaMetadataKey.sectionStartTimeInMedia.name -> "com.google.android.gms.cast.metadata.SECTION_START_TIME_IN_MEDIA"
|
PlatformBridgeApis.MediaMetadataKey.SECTION_START_TIME_IN_MEDIA.name -> "com.google.android.gms.cast.metadata.SECTION_START_TIME_IN_MEDIA"
|
||||||
PlatformBridgeApis.MediaMetadataKey.seriesTitle.name -> "com.google.android.gms.cast.metadata.SERIES_TITLE"
|
PlatformBridgeApis.MediaMetadataKey.SERIES_TITLE.name -> "com.google.android.gms.cast.metadata.SERIES_TITLE"
|
||||||
PlatformBridgeApis.MediaMetadataKey.studio.name -> "com.google.android.gms.cast.metadata.STUDIO"
|
PlatformBridgeApis.MediaMetadataKey.STUDIO.name -> "com.google.android.gms.cast.metadata.STUDIO"
|
||||||
PlatformBridgeApis.MediaMetadataKey.subtitle.name -> "com.google.android.gms.cast.metadata.SUBTITLE"
|
PlatformBridgeApis.MediaMetadataKey.SUBTITLE.name -> "com.google.android.gms.cast.metadata.SUBTITLE"
|
||||||
PlatformBridgeApis.MediaMetadataKey.title.name -> "com.google.android.gms.cast.metadata.TITLE"
|
PlatformBridgeApis.MediaMetadataKey.TITLE.name -> "com.google.android.gms.cast.metadata.TITLE"
|
||||||
PlatformBridgeApis.MediaMetadataKey.trackNumber.name -> "com.google.android.gms.cast.metadata.TRACK_NUMBER"
|
PlatformBridgeApis.MediaMetadataKey.TRACK_NUMBER.name -> "com.google.android.gms.cast.metadata.TRACK_NUMBER"
|
||||||
PlatformBridgeApis.MediaMetadataKey.width.name -> "com.google.android.gms.cast.metadata.WIDTH"
|
PlatformBridgeApis.MediaMetadataKey.WIDTH.name -> "com.google.android.gms.cast.metadata.WIDTH"
|
||||||
else -> throw IllegalArgumentException("mediaMetadataKey.strings keys is incorrect")
|
else -> throw IllegalArgumentException("mediaMetadataKey.strings keys is incorrect")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -141,22 +141,22 @@ fun getMediaTrack(mediaTrack: PlatformBridgeApis.MediaTrack): MediaTrack {
|
||||||
|
|
||||||
fun getTrackType(trackType: PlatformBridgeApis.TrackType): Int {
|
fun getTrackType(trackType: PlatformBridgeApis.TrackType): Int {
|
||||||
return when (trackType) {
|
return when (trackType) {
|
||||||
PlatformBridgeApis.TrackType.unknown -> 0
|
PlatformBridgeApis.TrackType.UNKNOWN -> 0
|
||||||
PlatformBridgeApis.TrackType.text -> 1
|
PlatformBridgeApis.TrackType.TEXT -> 1
|
||||||
PlatformBridgeApis.TrackType.audio -> 2
|
PlatformBridgeApis.TrackType.AUDIO -> 2
|
||||||
PlatformBridgeApis.TrackType.video -> 3
|
PlatformBridgeApis.TrackType.VIDEO -> 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getTrackSubtype(trackSubtype: PlatformBridgeApis.TrackSubtype): Int {
|
fun getTrackSubtype(trackSubtype: PlatformBridgeApis.TrackSubtype): Int {
|
||||||
return when (trackSubtype) {
|
return when (trackSubtype) {
|
||||||
PlatformBridgeApis.TrackSubtype.unknown -> -1
|
PlatformBridgeApis.TrackSubtype.UNKNOWN -> -1
|
||||||
PlatformBridgeApis.TrackSubtype.none -> 0
|
PlatformBridgeApis.TrackSubtype.NONE -> 0
|
||||||
PlatformBridgeApis.TrackSubtype.subtitles -> 1
|
PlatformBridgeApis.TrackSubtype.SUBTITLES -> 1
|
||||||
PlatformBridgeApis.TrackSubtype.captions -> 2
|
PlatformBridgeApis.TrackSubtype.CAPTIONS -> 2
|
||||||
PlatformBridgeApis.TrackSubtype.descriptions -> 3
|
PlatformBridgeApis.TrackSubtype.DESCRIPTIONS -> 3
|
||||||
PlatformBridgeApis.TrackSubtype.chapters -> 4
|
PlatformBridgeApis.TrackSubtype.CHAPTERS -> 4
|
||||||
PlatformBridgeApis.TrackSubtype.metadata -> 5
|
PlatformBridgeApis.TrackSubtype.METADATA -> 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,21 +26,18 @@ apply plugin: 'kotlin-android'
|
||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 31
|
compileSdkVersion 33
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.java.srcDirs += 'src/main/kotlin'
|
main.java.srcDirs += 'src/main/kotlin'
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
|
||||||
disable 'InvalidPackage'
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.gianlucaparadise.flutter_cast_framework_example"
|
applicationId "com.gianlucaparadise.flutter_cast_framework_example"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 30
|
targetSdkVersion 33
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
@ -53,6 +50,10 @@ android {
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lint {
|
||||||
|
disable 'InvalidPackage'
|
||||||
|
}
|
||||||
|
namespace 'com.gianlucaparadise.flutter_cast_framework_example'
|
||||||
}
|
}
|
||||||
|
|
||||||
flutter {
|
flutter {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="com.gianlucaparadise.flutter_cast_framework_example">
|
|
||||||
<!-- Flutter needs it to communicate with the running application
|
<!-- Flutter needs it to communicate with the running application
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="com.gianlucaparadise.flutter_cast_framework_example">
|
|
||||||
|
|
||||||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
||||||
calls FlutterMain.startInitialization(this); in its onCreate method.
|
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||||
|
|
@ -12,6 +11,7 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
|
android:exported="true"
|
||||||
android:theme="@style/LaunchTheme"
|
android:theme="@style/LaunchTheme"
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import com.google.android.gms.cast.framework.SessionProvider
|
||||||
class CastOptionsProvider : OptionsProvider {
|
class CastOptionsProvider : OptionsProvider {
|
||||||
override fun getCastOptions(context: Context): CastOptions {
|
override fun getCastOptions(context: Context): CastOptions {
|
||||||
return CastOptions.Builder()
|
return CastOptions.Builder()
|
||||||
.setReceiverApplicationId("D6760CCD")
|
.setReceiverApplicationId("CC1AD845")
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="com.gianlucaparadise.flutter_cast_framework_example">
|
|
||||||
<!-- Flutter needs it to communicate with the running application
|
<!-- Flutter needs it to communicate with the running application
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.5.31'
|
ext.kotlin_version = '1.6.21'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.2.2'
|
classpath 'com.android.tools.build:gradle:7.4.2'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# Uncomment this line to define a global platform for your project
|
# Uncomment this line to define a global platform for your project
|
||||||
# platform :ios, '9.0'
|
# platform :ios, '11.0'
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,6 @@ SPEC CHECKSUMS:
|
||||||
GTMSessionFetcher: 43748f93435c2aa068b1cbe39655aaf600652e91
|
GTMSessionFetcher: 43748f93435c2aa068b1cbe39655aaf600652e91
|
||||||
Protobuf: e9b99dd5da72f665ec503b19191f245a22188b4d
|
Protobuf: e9b99dd5da72f665ec503b19191f245a22188b4d
|
||||||
|
|
||||||
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
|
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
COCOAPODS: 1.12.0
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 46;
|
objectVersion = 54;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
|
@ -171,7 +171,7 @@
|
||||||
97C146E61CF9000F007C117D /* Project object */ = {
|
97C146E61CF9000F007C117D /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 1020;
|
LastUpgradeCheck = 1300;
|
||||||
ORGANIZATIONNAME = "The Chromium Authors";
|
ORGANIZATIONNAME = "The Chromium Authors";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
97C146ED1CF9000F007C117D = {
|
97C146ED1CF9000F007C117D = {
|
||||||
|
|
@ -217,6 +217,7 @@
|
||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
|
|
@ -231,6 +232,7 @@
|
||||||
};
|
};
|
||||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
|
|
@ -380,7 +382,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
|
@ -402,7 +404,7 @@
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
LIBRARY_SEARCH_PATHS = (
|
LIBRARY_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
|
@ -463,7 +465,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
|
@ -512,7 +514,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||||
|
|
@ -536,7 +538,7 @@
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
LIBRARY_SEARCH_PATHS = (
|
LIBRARY_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
|
@ -567,7 +569,7 @@
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
LIBRARY_SEARCH_PATHS = (
|
LIBRARY_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1020"
|
LastUpgradeVersion = "1300"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import GoogleCast
|
||||||
|
|
||||||
@UIApplicationMain
|
@UIApplicationMain
|
||||||
@objc class AppDelegate: FlutterAppDelegate, GCKLoggerDelegate {
|
@objc class AppDelegate: FlutterAppDelegate, GCKLoggerDelegate {
|
||||||
let kReceiverAppID = "D6760CCD"
|
let kReceiverAppID = "CC1AD845"
|
||||||
let kDebugLoggingEnabled = true
|
let kDebugLoggingEnabled = true
|
||||||
|
|
||||||
override func application(
|
override func application(
|
||||||
|
|
|
||||||
|
|
@ -41,5 +41,9 @@
|
||||||
</array>
|
</array>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter_cast_framework/cast.dart';
|
import 'package:flutter_cast_framework/cast.dart';
|
||||||
|
import 'package:recase/recase.dart';
|
||||||
|
|
||||||
/// in seconds
|
/// in seconds
|
||||||
const double QUEUE_PRELOAD_TIME = 20;
|
const double QUEUE_PRELOAD_TIME = 20;
|
||||||
|
|
@ -92,8 +92,8 @@ MediaInfo _getMediaInfo(VideoInfo video) {
|
||||||
final mediaMetadata = MediaMetadata()
|
final mediaMetadata = MediaMetadata()
|
||||||
..mediaType = MediaType.movie
|
..mediaType = MediaType.movie
|
||||||
..strings = {
|
..strings = {
|
||||||
describeEnum(MediaMetadataKey.title): video.title,
|
MediaMetadataKey.title.name.constantCase: video.title,
|
||||||
describeEnum(MediaMetadataKey.subtitle): video.studio,
|
MediaMetadataKey.subtitle.name.constantCase: video.studio,
|
||||||
}
|
}
|
||||||
..webImages = [
|
..webImages = [
|
||||||
img,
|
img,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_cast_framework/cast.dart';
|
import 'package:flutter_cast_framework/cast.dart';
|
||||||
|
import 'package:recase/recase.dart';
|
||||||
|
|
||||||
class QueueItemHeading extends StatelessWidget {
|
class QueueItemHeading extends StatelessWidget {
|
||||||
final MediaInfo? mediaInfo;
|
final MediaInfo? mediaInfo;
|
||||||
|
|
@ -13,9 +13,9 @@ class QueueItemHeading extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final titleText = mediaInfo
|
final titleText = mediaInfo
|
||||||
?.mediaMetadata?.strings?[describeEnum(MediaMetadataKey.title)];
|
?.mediaMetadata?.strings?[MediaMetadataKey.title.name.constantCase];
|
||||||
final subtitleText = mediaInfo
|
final subtitleText = mediaInfo
|
||||||
?.mediaMetadata?.strings?[describeEnum(MediaMetadataKey.subtitle)];
|
?.mediaMetadata?.strings?[MediaMetadataKey.subtitle.name.constantCase];
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: cupertino_icons
|
name: cupertino_icons
|
||||||
sha256: a937da4c006989739ceb4d10e3bd6cce64ca85d0fe287fc5b2b9f6ee757dcee6
|
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.3"
|
version: "1.0.5"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -146,6 +146,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.1.0"
|
version: "5.1.0"
|
||||||
|
recase:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: recase
|
||||||
|
sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.1.0"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|
@ -203,10 +211,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: transparent_image
|
name: transparent_image
|
||||||
sha256: e566a616922a781489f4d91cc939b1b3203b6e4a093317805f2f82f0bb0f8dec
|
sha256: e8991d955a2094e197ca24c645efec2faf4285772a4746126ca12875e54ca02f
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.1"
|
||||||
vector_graphics:
|
vector_graphics:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ dependencies:
|
||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^0.1.2
|
cupertino_icons: ^1.0.5
|
||||||
transparent_image: ^2.0.0
|
transparent_image: ^2.0.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class MessageCastingChannel : GCKCastChannel {
|
||||||
castMessage.namespace = namespace
|
castMessage.namespace = namespace
|
||||||
castMessage.message = message
|
castMessage.message = message
|
||||||
|
|
||||||
flutterApi.onMessageReceivedMessage(castMessage) { (_: Error?) in
|
flutterApi.onMessageReceivedMessage(castMessage) { (_: FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
// Autogenerated from Pigeon (v3.1.0), do not edit directly.
|
// Autogenerated from Pigeon (v9.0.7), do not edit directly.
|
||||||
// See also: https://pub.dev/packages/pigeon
|
// See also: https://pub.dev/packages/pigeon
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
@protocol FlutterBinaryMessenger;
|
@protocol FlutterBinaryMessenger;
|
||||||
@protocol FlutterMessageCodec;
|
@protocol FlutterMessageCodec;
|
||||||
@class FlutterError;
|
@class FlutterError;
|
||||||
|
|
@ -8,77 +10,139 @@
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/// Docs here: https://developers.google.com/android/reference/com/google/android/gms/cast/MediaInfo
|
||||||
typedef NS_ENUM(NSUInteger, StreamType) {
|
typedef NS_ENUM(NSUInteger, StreamType) {
|
||||||
|
/// An invalid (unknown) stream type.
|
||||||
StreamTypeInvalid = 0,
|
StreamTypeInvalid = 0,
|
||||||
|
/// A stream type of "none".
|
||||||
StreamTypeNone = 1,
|
StreamTypeNone = 1,
|
||||||
|
/// A buffered stream type.
|
||||||
StreamTypeBuffered = 2,
|
StreamTypeBuffered = 2,
|
||||||
|
/// A live stream type.
|
||||||
StreamTypeLive = 3,
|
StreamTypeLive = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Docs here: https://developers.google.com/android/reference/com/google/android/gms/cast/MediaMetadata
|
||||||
typedef NS_ENUM(NSUInteger, MediaType) {
|
typedef NS_ENUM(NSUInteger, MediaType) {
|
||||||
|
/// A media type representing generic media content.
|
||||||
MediaTypeGeneric = 0,
|
MediaTypeGeneric = 0,
|
||||||
|
/// A media type representing a movie.
|
||||||
MediaTypeMovie = 1,
|
MediaTypeMovie = 1,
|
||||||
|
/// A media type representing an TV show.
|
||||||
MediaTypeTvShow = 2,
|
MediaTypeTvShow = 2,
|
||||||
|
/// A media type representing a music track.
|
||||||
MediaTypeMusicTrack = 3,
|
MediaTypeMusicTrack = 3,
|
||||||
|
/// A media type representing a photo.
|
||||||
MediaTypePhoto = 4,
|
MediaTypePhoto = 4,
|
||||||
|
/// A media type representing an audiobook chapter.
|
||||||
MediaTypeAudiobookChapter = 5,
|
MediaTypeAudiobookChapter = 5,
|
||||||
|
/// The smallest media type value that can be assigned for application-defined media types.
|
||||||
MediaTypeUser = 6,
|
MediaTypeUser = 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Docs here: https://developers.google.com/android/reference/com/google/android/gms/cast/MediaMetadata
|
||||||
typedef NS_ENUM(NSUInteger, MediaMetadataKey) {
|
typedef NS_ENUM(NSUInteger, MediaMetadataKey) {
|
||||||
|
/// String key: Album artist.
|
||||||
MediaMetadataKeyAlbumArtist = 0,
|
MediaMetadataKeyAlbumArtist = 0,
|
||||||
|
/// String key: Album title.
|
||||||
MediaMetadataKeyAlbumTitle = 1,
|
MediaMetadataKeyAlbumTitle = 1,
|
||||||
|
/// String key: Artist.
|
||||||
MediaMetadataKeyArtist = 2,
|
MediaMetadataKeyArtist = 2,
|
||||||
|
/// String key: Audiobook title.
|
||||||
MediaMetadataKeyBookTitle = 3,
|
MediaMetadataKeyBookTitle = 3,
|
||||||
|
/// String key: Broadcast date.
|
||||||
MediaMetadataKeyBroadcastDate = 4,
|
MediaMetadataKeyBroadcastDate = 4,
|
||||||
|
/// String key: Chapter number.
|
||||||
MediaMetadataKeyChapterNumber = 5,
|
MediaMetadataKeyChapterNumber = 5,
|
||||||
|
/// String key: Chapter title.
|
||||||
MediaMetadataKeyChapterTitle = 6,
|
MediaMetadataKeyChapterTitle = 6,
|
||||||
|
/// String key: Composer.
|
||||||
MediaMetadataKeyComposer = 7,
|
MediaMetadataKeyComposer = 7,
|
||||||
|
/// String key: Creation date.
|
||||||
MediaMetadataKeyCreationDate = 8,
|
MediaMetadataKeyCreationDate = 8,
|
||||||
|
/// Integer key: Disc number.
|
||||||
MediaMetadataKeyDiscNumber = 9,
|
MediaMetadataKeyDiscNumber = 9,
|
||||||
|
/// Integer key: Episode number.
|
||||||
MediaMetadataKeyEpisodeNumber = 10,
|
MediaMetadataKeyEpisodeNumber = 10,
|
||||||
|
/// Integer key: Height.
|
||||||
MediaMetadataKeyHeight = 11,
|
MediaMetadataKeyHeight = 11,
|
||||||
|
/// Double key: Location latitude.
|
||||||
MediaMetadataKeyLocationLatitude = 12,
|
MediaMetadataKeyLocationLatitude = 12,
|
||||||
|
/// Double key: Location longitude.
|
||||||
MediaMetadataKeyLocationLongitude = 13,
|
MediaMetadataKeyLocationLongitude = 13,
|
||||||
|
/// String key: Location name.
|
||||||
MediaMetadataKeyLocationName = 14,
|
MediaMetadataKeyLocationName = 14,
|
||||||
|
/// Int key: Queue item ID.
|
||||||
MediaMetadataKeyQueueItemId = 15,
|
MediaMetadataKeyQueueItemId = 15,
|
||||||
|
/// String key: Release date.
|
||||||
MediaMetadataKeyReleaseDate = 16,
|
MediaMetadataKeyReleaseDate = 16,
|
||||||
|
/// Integer key: Season number.
|
||||||
MediaMetadataKeySeasonNumber = 17,
|
MediaMetadataKeySeasonNumber = 17,
|
||||||
|
/// Time key in milliseconds: section duration.
|
||||||
MediaMetadataKeySectionDuration = 18,
|
MediaMetadataKeySectionDuration = 18,
|
||||||
|
/// Time key in milliseconds: section start absolute time.
|
||||||
MediaMetadataKeySectionStartAbsoluteTime = 19,
|
MediaMetadataKeySectionStartAbsoluteTime = 19,
|
||||||
|
/// Time key in milliseconds: section start time in the container.
|
||||||
MediaMetadataKeySectionStartTimeInContainer = 20,
|
MediaMetadataKeySectionStartTimeInContainer = 20,
|
||||||
|
/// Time key in milliseconds: section start time in media item.
|
||||||
MediaMetadataKeySectionStartTimeInMedia = 21,
|
MediaMetadataKeySectionStartTimeInMedia = 21,
|
||||||
|
/// String key: Series title.
|
||||||
MediaMetadataKeySeriesTitle = 22,
|
MediaMetadataKeySeriesTitle = 22,
|
||||||
|
/// String key: Studio.
|
||||||
MediaMetadataKeyStudio = 23,
|
MediaMetadataKeyStudio = 23,
|
||||||
|
/// String key: Subtitle.
|
||||||
MediaMetadataKeySubtitle = 24,
|
MediaMetadataKeySubtitle = 24,
|
||||||
|
/// String key: Title.
|
||||||
MediaMetadataKeyTitle = 25,
|
MediaMetadataKeyTitle = 25,
|
||||||
|
/// Integer key: Track number.
|
||||||
MediaMetadataKeyTrackNumber = 26,
|
MediaMetadataKeyTrackNumber = 26,
|
||||||
|
/// Integer key: Width.
|
||||||
MediaMetadataKeyWidth = 27,
|
MediaMetadataKeyWidth = 27,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Docs here: https://developers.google.com/android/reference/com/google/android/gms/cast/MediaTrack
|
||||||
typedef NS_ENUM(NSUInteger, TrackType) {
|
typedef NS_ENUM(NSUInteger, TrackType) {
|
||||||
|
/// A media track type indicating an unknown track type.
|
||||||
TrackTypeUnknown = 0,
|
TrackTypeUnknown = 0,
|
||||||
|
/// A media track type indicating a text track.
|
||||||
TrackTypeText = 1,
|
TrackTypeText = 1,
|
||||||
|
/// A media track type indicating an audio track.
|
||||||
TrackTypeAudio = 2,
|
TrackTypeAudio = 2,
|
||||||
|
/// A media track type indicating a video track.
|
||||||
TrackTypeVideo = 3,
|
TrackTypeVideo = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Docs here: https://developers.google.com/android/reference/com/google/android/gms/cast/MediaTrack
|
||||||
typedef NS_ENUM(NSUInteger, TrackSubtype) {
|
typedef NS_ENUM(NSUInteger, TrackSubtype) {
|
||||||
|
/// A media track subtype indicating an unknown subtype.
|
||||||
TrackSubtypeUnknown = 0,
|
TrackSubtypeUnknown = 0,
|
||||||
|
/// A media track subtype indicating no subtype.
|
||||||
TrackSubtypeNone = 1,
|
TrackSubtypeNone = 1,
|
||||||
|
/// A media track subtype indicating subtitles.
|
||||||
TrackSubtypeSubtitles = 2,
|
TrackSubtypeSubtitles = 2,
|
||||||
|
/// A media track subtype indicating closed captions.
|
||||||
TrackSubtypeCaptions = 3,
|
TrackSubtypeCaptions = 3,
|
||||||
|
/// A media track subtype indicating descriptions.
|
||||||
TrackSubtypeDescriptions = 4,
|
TrackSubtypeDescriptions = 4,
|
||||||
|
/// A media track subtype indicating chapters.
|
||||||
TrackSubtypeChapters = 5,
|
TrackSubtypeChapters = 5,
|
||||||
|
/// A media track subtype indicating metadata.
|
||||||
TrackSubtypeMetadata = 6,
|
TrackSubtypeMetadata = 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// State of the remote media player
|
||||||
typedef NS_ENUM(NSUInteger, PlayerState) {
|
typedef NS_ENUM(NSUInteger, PlayerState) {
|
||||||
|
/// Constant indicating unknown player state.
|
||||||
PlayerStateUnknown = 0,
|
PlayerStateUnknown = 0,
|
||||||
|
/// Constant indicating that the media player is idle.
|
||||||
PlayerStateIdle = 1,
|
PlayerStateIdle = 1,
|
||||||
|
/// Constant indicating that the media player is playing.
|
||||||
PlayerStatePlaying = 2,
|
PlayerStatePlaying = 2,
|
||||||
|
/// Constant indicating that the media player is paused.
|
||||||
PlayerStatePaused = 3,
|
PlayerStatePaused = 3,
|
||||||
|
/// Constant indicating that the media player is buffering.
|
||||||
PlayerStateBuffering = 4,
|
PlayerStateBuffering = 4,
|
||||||
|
/// Constant indicating that the media player is loading.
|
||||||
PlayerStateLoading = 5,
|
PlayerStateLoading = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -94,6 +158,7 @@ typedef NS_ENUM(NSUInteger, PlayerState) {
|
||||||
@class CastDevice;
|
@class CastDevice;
|
||||||
@class CastMessage;
|
@class CastMessage;
|
||||||
|
|
||||||
|
/// Docs here: https://developers.google.com/android/reference/com/google/android/gms/cast/MediaLoadRequestData
|
||||||
@interface MediaLoadRequestData : NSObject
|
@interface MediaLoadRequestData : NSObject
|
||||||
+ (instancetype)makeWithShouldAutoplay:(nullable NSNumber *)shouldAutoplay
|
+ (instancetype)makeWithShouldAutoplay:(nullable NSNumber *)shouldAutoplay
|
||||||
currentTime:(nullable NSNumber *)currentTime
|
currentTime:(nullable NSNumber *)currentTime
|
||||||
|
|
@ -103,6 +168,7 @@ typedef NS_ENUM(NSUInteger, PlayerState) {
|
||||||
@property(nonatomic, strong, nullable) MediaInfo * mediaInfo;
|
@property(nonatomic, strong, nullable) MediaInfo * mediaInfo;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
/// Docs here: https://developers.google.com/android/reference/com/google/android/gms/cast/MediaInfo
|
||||||
@interface MediaInfo : NSObject
|
@interface MediaInfo : NSObject
|
||||||
+ (instancetype)makeWithContentId:(nullable NSString *)contentId
|
+ (instancetype)makeWithContentId:(nullable NSString *)contentId
|
||||||
streamType:(StreamType)streamType
|
streamType:(StreamType)streamType
|
||||||
|
|
@ -119,9 +185,11 @@ typedef NS_ENUM(NSUInteger, PlayerState) {
|
||||||
@property(nonatomic, strong, nullable) NSArray<MediaTrack *> * mediaTracks;
|
@property(nonatomic, strong, nullable) NSArray<MediaTrack *> * mediaTracks;
|
||||||
@property(nonatomic, strong, nullable) NSNumber * streamDuration;
|
@property(nonatomic, strong, nullable) NSNumber * streamDuration;
|
||||||
@property(nonatomic, strong, nullable) NSArray<AdBreakClipInfo *> * adBreakClips;
|
@property(nonatomic, strong, nullable) NSArray<AdBreakClipInfo *> * adBreakClips;
|
||||||
|
/// String containing a json object
|
||||||
@property(nonatomic, copy, nullable) NSString * customDataAsJson;
|
@property(nonatomic, copy, nullable) NSString * customDataAsJson;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
/// Docs here: https://developers.google.com/android/reference/com/google/android/gms/cast/MediaMetadata
|
||||||
@interface MediaMetadata : NSObject
|
@interface MediaMetadata : NSObject
|
||||||
+ (instancetype)makeWithMediaType:(MediaType)mediaType
|
+ (instancetype)makeWithMediaType:(MediaType)mediaType
|
||||||
strings:(nullable NSDictionary<NSString *, NSString *> *)strings
|
strings:(nullable NSDictionary<NSString *, NSString *> *)strings
|
||||||
|
|
@ -131,11 +199,13 @@ typedef NS_ENUM(NSUInteger, PlayerState) {
|
||||||
@property(nonatomic, strong, nullable) NSArray<WebImage *> * webImages;
|
@property(nonatomic, strong, nullable) NSArray<WebImage *> * webImages;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
/// Docs here: https://developers.google.com/android/reference/com/google/android/gms/common/images/WebImage
|
||||||
@interface WebImage : NSObject
|
@interface WebImage : NSObject
|
||||||
+ (instancetype)makeWithUrl:(nullable NSString *)url;
|
+ (instancetype)makeWithUrl:(nullable NSString *)url;
|
||||||
@property(nonatomic, copy, nullable) NSString * url;
|
@property(nonatomic, copy, nullable) NSString * url;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
/// Docs here: https://developers.google.com/android/reference/com/google/android/gms/cast/MediaTrack
|
||||||
@interface MediaTrack : NSObject
|
@interface MediaTrack : NSObject
|
||||||
+ (instancetype)makeWithId:(nullable NSNumber *)id
|
+ (instancetype)makeWithId:(nullable NSNumber *)id
|
||||||
trackType:(TrackType)trackType
|
trackType:(TrackType)trackType
|
||||||
|
|
@ -226,6 +296,7 @@ typedef NS_ENUM(NSUInteger, PlayerState) {
|
||||||
/// The codec used by CastHostApi.
|
/// The codec used by CastHostApi.
|
||||||
NSObject<FlutterMessageCodec> *CastHostApiGetCodec(void);
|
NSObject<FlutterMessageCodec> *CastHostApiGetCodec(void);
|
||||||
|
|
||||||
|
/// APIs for Flutter-to-Host comunication
|
||||||
@protocol CastHostApi
|
@protocol CastHostApi
|
||||||
- (void)sendMessageMessage:(CastMessage *)message error:(FlutterError *_Nullable *_Nonnull)error;
|
- (void)sendMessageMessage:(CastMessage *)message error:(FlutterError *_Nullable *_Nonnull)error;
|
||||||
- (void)showCastDialogWithError:(FlutterError *_Nullable *_Nonnull)error;
|
- (void)showCastDialogWithError:(FlutterError *_Nullable *_Nonnull)error;
|
||||||
|
|
@ -254,35 +325,37 @@ extern void CastHostApiSetup(id<FlutterBinaryMessenger> binaryMessenger, NSObjec
|
||||||
/// The codec used by CastFlutterApi.
|
/// The codec used by CastFlutterApi.
|
||||||
NSObject<FlutterMessageCodec> *CastFlutterApiGetCodec(void);
|
NSObject<FlutterMessageCodec> *CastFlutterApiGetCodec(void);
|
||||||
|
|
||||||
|
/// APIs for Host-to-Flutter comunication
|
||||||
@interface CastFlutterApi : NSObject
|
@interface CastFlutterApi : NSObject
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
|
||||||
- (void)getSessionMessageNamespacesWithCompletion:(void(^)(NSArray<NSString *> *_Nullable, NSError *_Nullable))completion;
|
- (void)getSessionMessageNamespacesWithCompletion:(void (^)(NSArray<NSString *> *_Nullable, FlutterError *_Nullable))completion;
|
||||||
- (void)onCastStateChangedCastState:(NSNumber *)castState completion:(void(^)(NSError *_Nullable))completion;
|
- (void)onCastStateChangedCastState:(NSNumber *)castState completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onMessageReceivedMessage:(CastMessage *)message completion:(void(^)(NSError *_Nullable))completion;
|
- (void)onMessageReceivedMessage:(CastMessage *)message completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onSessionStartingWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onSessionStartingWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onSessionStartedWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onSessionStartedWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onSessionStartFailedWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onSessionStartFailedWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onSessionEndingWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onSessionEndingWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onSessionEndedWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onSessionEndedWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onSessionResumingWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onSessionResumingWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onSessionResumedWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onSessionResumedWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onSessionResumeFailedWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onSessionResumeFailedWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onSessionSuspendedWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onSessionSuspendedWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onStatusUpdatedMediaStatus:(MediaStatus *)mediaStatus completion:(void(^)(NSError *_Nullable))completion;
|
- (void)onStatusUpdatedMediaStatus:(MediaStatus *)mediaStatus completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onMetadataUpdatedWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onMetadataUpdatedWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onQueueStatusUpdatedWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onQueueStatusUpdatedWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onPreloadStatusUpdatedWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onPreloadStatusUpdatedWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onSendingRemoteMediaRequestWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onSendingRemoteMediaRequestWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onAdBreakStatusUpdatedMediaStatus:(MediaStatus *)mediaStatus completion:(void(^)(NSError *_Nullable))completion;
|
- (void)onAdBreakStatusUpdatedMediaStatus:(MediaStatus *)mediaStatus completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onMediaErrorWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)onMediaErrorWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onProgressUpdatedProgressMs:(NSNumber *)progressMs durationMs:(NSNumber *)durationMs completion:(void(^)(NSError *_Nullable))completion;
|
- (void)onProgressUpdatedProgressMs:(NSNumber *)progressMs durationMs:(NSNumber *)durationMs completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)onAdBreakClipProgressUpdatedAdBreakId:(NSString *)adBreakId adBreakClipId:(NSString *)adBreakClipId progressMs:(NSNumber *)progressMs durationMs:(NSNumber *)durationMs whenSkippableMs:(NSNumber *)whenSkippableMs completion:(void(^)(NSError *_Nullable))completion;
|
- (void)onAdBreakClipProgressUpdatedAdBreakId:(NSString *)adBreakId adBreakClipId:(NSString *)adBreakClipId progressMs:(NSNumber *)progressMs durationMs:(NSNumber *)durationMs whenSkippableMs:(NSNumber *)whenSkippableMs completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)itemsInsertedInRangeInsertIndex:(NSNumber *)insertIndex insertCount:(NSNumber *)insertCount completion:(void(^)(NSError *_Nullable))completion;
|
- (void)itemsInsertedInRangeInsertIndex:(NSNumber *)insertIndex insertCount:(NSNumber *)insertCount completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)itemsReloadedWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)itemsReloadedWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)itemsRemovedAtIndexesIndexes:(NSArray<NSNumber *> *)indexes completion:(void(^)(NSError *_Nullable))completion;
|
- (void)itemsRemovedAtIndexesIndexes:(NSArray<NSNumber *> *)indexes completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)itemsReorderedAtIndexesIndexes:(NSArray<NSNumber *> *)indexes insertBeforeIndex:(NSNumber *)insertBeforeIndex completion:(void(^)(NSError *_Nullable))completion;
|
- (void)itemsReorderedAtIndexesIndexes:(NSArray<NSNumber *> *)indexes insertBeforeIndex:(NSNumber *)insertBeforeIndex completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)itemsUpdatedAtIndexesIndexes:(NSArray<NSNumber *> *)indexes completion:(void(^)(NSError *_Nullable))completion;
|
- (void)itemsUpdatedAtIndexesIndexes:(NSArray<NSNumber *> *)indexes completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)mediaQueueChangedWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)mediaQueueChangedWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
- (void)mediaQueueWillChangeWithCompletion:(void(^)(NSError *_Nullable))completion;
|
- (void)mediaQueueWillChangeWithCompletion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -135,7 +135,7 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
let castStateRaw = castState.rawValue
|
let castStateRaw = castState.rawValue
|
||||||
// Android CastStates are 1-to-4, while iOS CastStates are 0-to-3. I align iOS to Android by adding 1
|
// Android CastStates are 1-to-4, while iOS CastStates are 0-to-3. I align iOS to Android by adding 1
|
||||||
let castStateRawAdjusted = castStateRaw + 1
|
let castStateRawAdjusted = castStateRaw + 1
|
||||||
self.flutterApi.onCastStateChangedCastState(NSNumber(value: castStateRawAdjusted)) { (_: Error?) in
|
self.flutterApi.onCastStateChangedCastState(NSNumber(value: castStateRawAdjusted)) { (_: FlutterError?) in
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -225,7 +225,7 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
let nsAdBreakClipDuration = NSNumber(value: adBreakClipDurationMs)
|
let nsAdBreakClipDuration = NSNumber(value: adBreakClipDurationMs)
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.flutterApi.onAdBreakClipProgressUpdatedAdBreakId(adBreakId, adBreakClipId: adBreakClipId, progressMs: nsAdBreakClipProgress, durationMs: nsAdBreakClipDuration, whenSkippableMs: nsWhenSkippable) { (_:Error?) in
|
self.flutterApi.onAdBreakClipProgressUpdatedAdBreakId(adBreakId, adBreakClipId: adBreakClipId, progressMs: nsAdBreakClipProgress, durationMs: nsAdBreakClipDuration, whenSkippableMs: nsWhenSkippable) { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -241,7 +241,7 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
let nsProgress = NSNumber(value: progressMs)
|
let nsProgress = NSNumber(value: progressMs)
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.flutterApi.onProgressUpdatedProgressMs(nsProgress, durationMs: nsDuration) { (_:Error?) in
|
self.flutterApi.onProgressUpdatedProgressMs(nsProgress, durationMs: nsDuration) { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -386,14 +386,14 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
// onSessionSuspended
|
// onSessionSuspended
|
||||||
public func sessionManager(_ sessionManager: GCKSessionManager, didSuspend session: GCKCastSession, with reason: GCKConnectionSuspendReason) {
|
public func sessionManager(_ sessionManager: GCKSessionManager, didSuspend session: GCKCastSession, with reason: GCKConnectionSuspendReason) {
|
||||||
debugPrint("SessionListener: didSuspend")
|
debugPrint("SessionListener: didSuspend")
|
||||||
flutterApi.onSessionSuspended { (_:Error?) in
|
flutterApi.onSessionSuspended { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// onSessionStarting
|
// onSessionStarting
|
||||||
public func sessionManager(_ sessionManager: GCKSessionManager, willStart session: GCKCastSession) {
|
public func sessionManager(_ sessionManager: GCKSessionManager, willStart session: GCKCastSession) {
|
||||||
debugPrint("SessionListener: willStart")
|
debugPrint("SessionListener: willStart")
|
||||||
flutterApi.onSessionStarting { (_:Error?) in
|
flutterApi.onSessionStarting { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
|
|
||||||
castSession = session
|
castSession = session
|
||||||
|
|
@ -402,7 +402,7 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
// onSessionResuming
|
// onSessionResuming
|
||||||
public func sessionManager(_ sessionManager: GCKSessionManager, willResumeCastSession session: GCKCastSession) {
|
public func sessionManager(_ sessionManager: GCKSessionManager, willResumeCastSession session: GCKCastSession) {
|
||||||
debugPrint("SessionListener: willResumeCastSession")
|
debugPrint("SessionListener: willResumeCastSession")
|
||||||
flutterApi.onSessionResuming { (_:Error?) in
|
flutterApi.onSessionResuming { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
|
|
||||||
castSession = session
|
castSession = session
|
||||||
|
|
@ -412,14 +412,14 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
public func sessionManager(_ sessionManager: GCKSessionManager, willEnd session: GCKCastSession) {
|
public func sessionManager(_ sessionManager: GCKSessionManager, willEnd session: GCKCastSession) {
|
||||||
debugPrint("SessionListener: willEnd")
|
debugPrint("SessionListener: willEnd")
|
||||||
stopProgressTimer()
|
stopProgressTimer()
|
||||||
flutterApi.onSessionEnding { (_:Error?) in
|
flutterApi.onSessionEnding { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// onSessionStartFailed
|
// onSessionStartFailed
|
||||||
public func sessionManager(_ sessionManager: GCKSessionManager, didFailToStart session: GCKCastSession, withError error: Error) {
|
public func sessionManager(_ sessionManager: GCKSessionManager, didFailToStart session: GCKCastSession, withError error: Error) {
|
||||||
debugPrint("SessionListener: didFailToStart")
|
debugPrint("SessionListener: didFailToStart")
|
||||||
flutterApi.onSessionStartFailed { (_:Error?) in
|
flutterApi.onSessionStartFailed { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -428,7 +428,7 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
// onSessionStarted
|
// onSessionStarted
|
||||||
public func sessionManager(_ sessionManager: GCKSessionManager, didStart session: GCKCastSession) {
|
public func sessionManager(_ sessionManager: GCKSessionManager, didStart session: GCKCastSession) {
|
||||||
debugPrint("SessionListener: didStart")
|
debugPrint("SessionListener: didStart")
|
||||||
flutterApi.onSessionStarted { (_:Error?) in
|
flutterApi.onSessionStarted { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
|
|
||||||
castSession = session
|
castSession = session
|
||||||
|
|
@ -437,7 +437,7 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
// onSessionResumed
|
// onSessionResumed
|
||||||
public func sessionManager(_ sessionManager: GCKSessionManager, didResumeCastSession session: GCKCastSession) {
|
public func sessionManager(_ sessionManager: GCKSessionManager, didResumeCastSession session: GCKCastSession) {
|
||||||
debugPrint("SessionListener: didResumeCastSession")
|
debugPrint("SessionListener: didResumeCastSession")
|
||||||
flutterApi.onSessionResumed { (_:Error?) in
|
flutterApi.onSessionResumed { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
|
|
||||||
castSession = session
|
castSession = session
|
||||||
|
|
@ -446,21 +446,21 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
// onSessionEnded
|
// onSessionEnded
|
||||||
public func sessionManager(_ sessionManager: GCKSessionManager, didEnd session: GCKCastSession, withError error: Error?) {
|
public func sessionManager(_ sessionManager: GCKSessionManager, didEnd session: GCKCastSession, withError error: Error?) {
|
||||||
debugPrint("SessionListener: didEnd")
|
debugPrint("SessionListener: didEnd")
|
||||||
flutterApi.onSessionEnded { (_:Error?) in
|
flutterApi.onSessionEnded { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// onQueueStatusUpdated
|
// onQueueStatusUpdated
|
||||||
public func remoteMediaClientDidUpdateQueue(_ client: GCKRemoteMediaClient) {
|
public func remoteMediaClientDidUpdateQueue(_ client: GCKRemoteMediaClient) {
|
||||||
debugPrint("RemoteMediaClientListener: didUpdateQueue")
|
debugPrint("RemoteMediaClientListener: didUpdateQueue")
|
||||||
flutterApi.onQueueStatusUpdated { (_:Error?) in
|
flutterApi.onQueueStatusUpdated { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// onPreloadStatusUpdated
|
// onPreloadStatusUpdated
|
||||||
public func remoteMediaClientDidUpdatePreloadStatus(_ client: GCKRemoteMediaClient) {
|
public func remoteMediaClientDidUpdatePreloadStatus(_ client: GCKRemoteMediaClient) {
|
||||||
debugPrint("RemoteMediaClientListener: didUpdatePreloadStatus")
|
debugPrint("RemoteMediaClientListener: didUpdatePreloadStatus")
|
||||||
flutterApi.onPreloadStatusUpdated { (_:Error?) in
|
flutterApi.onPreloadStatusUpdated { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -490,9 +490,9 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
|
|
||||||
debugPrint("RemoteMediaClientListener: didUpdate mediaStatus - playerState: \(playerStateLabel)")
|
debugPrint("RemoteMediaClientListener: didUpdate mediaStatus - playerState: \(playerStateLabel)")
|
||||||
let flutterMediaStatus = getFlutterMediaStatus(mediaStatus: mediaStatus)
|
let flutterMediaStatus = getFlutterMediaStatus(mediaStatus: mediaStatus)
|
||||||
flutterApi.onStatusUpdatedMediaStatus(flutterMediaStatus) { (_:Error?) in
|
flutterApi.onStatusUpdatedMediaStatus(flutterMediaStatus) { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
flutterApi.onAdBreakStatusUpdatedMediaStatus(flutterMediaStatus) { (_:Error?) in
|
flutterApi.onAdBreakStatusUpdatedMediaStatus(flutterMediaStatus) { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -502,70 +502,70 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
// onMetadataUpdated
|
// onMetadataUpdated
|
||||||
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didUpdate mediaMetadata: GCKMediaMetadata?) {
|
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didUpdate mediaMetadata: GCKMediaMetadata?) {
|
||||||
debugPrint("RemoteMediaClientListener: didUpdate mediaMetadata")
|
debugPrint("RemoteMediaClientListener: didUpdate mediaMetadata")
|
||||||
flutterApi.onMetadataUpdated { (_:Error?) in
|
flutterApi.onMetadataUpdated { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// onQueueStatusUpdated
|
// onQueueStatusUpdated
|
||||||
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didReceive queueItems: [GCKMediaQueueItem]) {
|
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didReceive queueItems: [GCKMediaQueueItem]) {
|
||||||
debugPrint("RemoteMediaClientListener: didReceive queueItems")
|
debugPrint("RemoteMediaClientListener: didReceive queueItems")
|
||||||
flutterApi.onQueueStatusUpdated { (_:Error?) in
|
flutterApi.onQueueStatusUpdated { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// onSendingRemoteMediaRequest
|
// onSendingRemoteMediaRequest
|
||||||
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didStartMediaSessionWithID sessionID: Int) {
|
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didStartMediaSessionWithID sessionID: Int) {
|
||||||
debugPrint("RemoteMediaClientListener: didStartMediaSessionWithID")
|
debugPrint("RemoteMediaClientListener: didStartMediaSessionWithID")
|
||||||
flutterApi.onSendingRemoteMediaRequest { (_:Error?) in
|
flutterApi.onSendingRemoteMediaRequest { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// onQueueStatusUpdated
|
// onQueueStatusUpdated
|
||||||
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didReceiveQueueItemIDs queueItemIDs: [NSNumber]) {
|
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didReceiveQueueItemIDs queueItemIDs: [NSNumber]) {
|
||||||
debugPrint("RemoteMediaClientListener: didReceiveQueueItemIDs")
|
debugPrint("RemoteMediaClientListener: didReceiveQueueItemIDs")
|
||||||
flutterApi.onQueueStatusUpdated { (_:Error?) in
|
flutterApi.onQueueStatusUpdated { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// onQueueStatusUpdated
|
// onQueueStatusUpdated
|
||||||
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didUpdateQueueItemsWithIDs queueItemIDs: [NSNumber]) {
|
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didUpdateQueueItemsWithIDs queueItemIDs: [NSNumber]) {
|
||||||
debugPrint("RemoteMediaClientListener: didUpdateQueueItemsWithIDs")
|
debugPrint("RemoteMediaClientListener: didUpdateQueueItemsWithIDs")
|
||||||
flutterApi.onQueueStatusUpdated { (_:Error?) in
|
flutterApi.onQueueStatusUpdated { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// onQueueStatusUpdated
|
// onQueueStatusUpdated
|
||||||
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didRemoveQueueItemsWithIDs queueItemIDs: [NSNumber]) {
|
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didRemoveQueueItemsWithIDs queueItemIDs: [NSNumber]) {
|
||||||
debugPrint("RemoteMediaClientListener: didRemoveQueueItemsWithIDs")
|
debugPrint("RemoteMediaClientListener: didRemoveQueueItemsWithIDs")
|
||||||
flutterApi.onQueueStatusUpdated { (_:Error?) in
|
flutterApi.onQueueStatusUpdated { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// onQueueStatusUpdated
|
// onQueueStatusUpdated
|
||||||
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didInsertQueueItemsWithIDs queueItemIDs: [NSNumber], beforeItemWithID beforeItemID: UInt) {
|
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didInsertQueueItemsWithIDs queueItemIDs: [NSNumber], beforeItemWithID beforeItemID: UInt) {
|
||||||
debugPrint("RemoteMediaClientListener: didInsertQueueItemsWithIDs")
|
debugPrint("RemoteMediaClientListener: didInsertQueueItemsWithIDs")
|
||||||
flutterApi.onQueueStatusUpdated { (_:Error?) in
|
flutterApi.onQueueStatusUpdated { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// mediaQueueWillChange
|
// mediaQueueWillChange
|
||||||
public func mediaQueueWillChange(_ queue: GCKMediaQueue) {
|
public func mediaQueueWillChange(_ queue: GCKMediaQueue) {
|
||||||
debugPrint("MediaQueueListener: mediaQueueWillChange")
|
debugPrint("MediaQueueListener: mediaQueueWillChange")
|
||||||
flutterApi.mediaQueueWillChange { (_:Error?) in
|
flutterApi.mediaQueueWillChange { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// mediaQueueChanged
|
// mediaQueueChanged
|
||||||
public func mediaQueueDidChange(_ queue: GCKMediaQueue) {
|
public func mediaQueueDidChange(_ queue: GCKMediaQueue) {
|
||||||
debugPrint("MediaQueueListener: mediaQueueDidChange")
|
debugPrint("MediaQueueListener: mediaQueueDidChange")
|
||||||
flutterApi.mediaQueueChanged { (_:Error?) in
|
flutterApi.mediaQueueChanged { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// itemsReloaded
|
// itemsReloaded
|
||||||
public func mediaQueueDidReloadItems(_ queue: GCKMediaQueue) {
|
public func mediaQueueDidReloadItems(_ queue: GCKMediaQueue) {
|
||||||
debugPrint("MediaQueueListener: mediaQueueDidReloadItems")
|
debugPrint("MediaQueueListener: mediaQueueDidReloadItems")
|
||||||
flutterApi.itemsReloaded { (_:Error?) in
|
flutterApi.itemsReloaded { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -574,21 +574,21 @@ public class SwiftFlutterCastFrameworkPlugin: NSObject, FlutterPlugin, GCKSessio
|
||||||
debugPrint("MediaQueueListener: mediaQueueDidInsertItemsIn")
|
debugPrint("MediaQueueListener: mediaQueueDidInsertItemsIn")
|
||||||
let count = range.upperBound - range.lowerBound
|
let count = range.upperBound - range.lowerBound
|
||||||
let start = range.lowerBound
|
let start = range.lowerBound
|
||||||
flutterApi.itemsInserted(inRangeInsertIndex: NSNumber(value: start), insertCount: NSNumber(value: count)) { (_:Error?) in
|
flutterApi.itemsInserted(inRangeInsertIndex: NSNumber(value: start), insertCount: NSNumber(value: count)) { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// itemsUpdatedAtIndexes
|
// itemsUpdatedAtIndexes
|
||||||
public func mediaQueue(_ queue: GCKMediaQueue, didUpdateItemsAtIndexes indexes: [NSNumber]) {
|
public func mediaQueue(_ queue: GCKMediaQueue, didUpdateItemsAtIndexes indexes: [NSNumber]) {
|
||||||
debugPrint("MediaQueueListener: mediaQueueDidUpdateItemsAtIndexes")
|
debugPrint("MediaQueueListener: mediaQueueDidUpdateItemsAtIndexes")
|
||||||
flutterApi.itemsUpdated(atIndexesIndexes: indexes) { (_:Error?) in
|
flutterApi.itemsUpdated(atIndexesIndexes: indexes) { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// itemsRemovedAtIndexes
|
// itemsRemovedAtIndexes
|
||||||
public func mediaQueue(_ queue: GCKMediaQueue, didRemoveItemsAtIndexes indexes: [NSNumber]) {
|
public func mediaQueue(_ queue: GCKMediaQueue, didRemoveItemsAtIndexes indexes: [NSNumber]) {
|
||||||
debugPrint("MediaQueueListener: mediaQueueDidRemoveItemsAtIndexes")
|
debugPrint("MediaQueueListener: mediaQueueDidRemoveItemsAtIndexes")
|
||||||
flutterApi.itemsRemoved(atIndexesIndexes: indexes) { (_:Error?) in
|
flutterApi.itemsRemoved(atIndexesIndexes: indexes) { (_:FlutterError?) in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -251,6 +251,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.3"
|
version: "2.1.3"
|
||||||
|
recase:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: recase
|
||||||
|
sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.1.0"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ dependencies:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_svg: ^2.0.4
|
flutter_svg: ^2.0.4
|
||||||
meta: ^1.8.0
|
meta: ^1.8.0
|
||||||
|
recase: ^4.1.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
dartdoc: ^6.2.0
|
dartdoc: ^6.2.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue