-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add newer cast API additions and stub methods
- Loading branch information
Showing
22 changed files
with
294 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"use strict"; | ||
|
||
// https://developers.google.com/cast/docs/reference/chrome/chrome.cast.CredentialsData | ||
export default class DialRequest { | ||
constructor ( | ||
public credentials: string | ||
, public credentialsData: string) { | ||
} | ||
} |
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,19 +1,20 @@ | ||
"use strict"; | ||
|
||
import { Capability } from "../enums"; | ||
import CredentialsData from "./CredentialsData"; | ||
import Timeout from "./Timeout"; | ||
|
||
import { Capability } from "../enums"; | ||
|
||
|
||
// https://developers.google.com/cast/docs/reference/chrome/chrome.cast.SessionRequest | ||
export default class SessionRequest { | ||
public language: (string | null) = null; | ||
public dialRequest: any = null; | ||
|
||
constructor ( | ||
public appId: string | ||
, public capabilities = [ | ||
Capability.VIDEO_OUT | ||
, Capability.AUDIO_OUT ] | ||
, public requestSessionTimeout: number | ||
= (new Timeout()).requestSession) {} | ||
, public capabilities = [ Capability.VIDEO_OUT | ||
, Capability.AUDIO_OUT ] | ||
, public timeout: number = (new Timeout()).requestSession | ||
, public androidReceiverCompatible = false | ||
, public credentialsData: (CredentialsData | null) = null) {} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
ext/src/shim/cast/media/classes/AudiobookChapterMediaMetadata.ts
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,16 @@ | ||
"use strict"; | ||
|
||
import Image from "../../classes/Image"; | ||
|
||
import { MetadataType } from "../enums"; | ||
|
||
|
||
export default class AudiobookChapterMediaMetadata { | ||
public bookTitle?: string; | ||
public chapterNumber?: number; | ||
public chapterTitle?: string; | ||
public images?: Image[]; | ||
public subtitle?: string; | ||
public title?: string; | ||
public type = MetadataType.AUDIOBOOK_CHAPTER; | ||
} |
8 changes: 8 additions & 0 deletions
8
ext/src/shim/cast/media/classes/AudiobookContainerMetadata.ts
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,8 @@ | ||
"use strict"; | ||
|
||
export default class AudiobookContainerMetadata { | ||
public authors?: string[]; | ||
public narrators?: string[]; | ||
public publisher?: string; | ||
public releaseDate?: string; | ||
} |
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,11 @@ | ||
"use strict"; | ||
|
||
export default class Break { | ||
public duration?: number; | ||
public isEmbedded?: boolean; | ||
public isWatched = false; | ||
|
||
constructor(public id: string | ||
, public breakClipIds: string[] | ||
, public position: number) {} | ||
} |
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 @@ | ||
"use strict"; | ||
|
||
import VastAdsRequest from "./VastAdsRequest"; | ||
|
||
import { HlsSegmentFormat } from "../enums"; | ||
|
||
|
||
export default class BreakClip { | ||
public clickThroughUrl?: string; | ||
public contentId?: string; | ||
public contentType?: string; | ||
public contentUrl?: string; | ||
public customData?: {}; | ||
public duration?: number; | ||
public hlsSegmentFormat?: HlsSegmentFormat; | ||
public posterUrl?: string; | ||
public title?: string; | ||
public vastAdsRequest?: VastAdsRequest; | ||
public whenSkippable?: number; | ||
|
||
constructor(public id: string) {} | ||
} |
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,9 @@ | ||
"use strict"; | ||
|
||
export default class BreakStatus { | ||
public breakClipId?: string; | ||
public breakId?: string; | ||
public currentBreakClipTime?: number; | ||
public currentBreakTime?: number; | ||
public whenSkippable?: number; | ||
} |
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,17 @@ | ||
"use strict"; | ||
|
||
import Image from "../../classes/Image"; | ||
import MediaMetadata from "../classes/MediaMetadata"; | ||
|
||
import { ContainerType } from "../enums"; | ||
|
||
|
||
export default class ContainerMetadata { | ||
public containerDuration?: number; | ||
public containerImages?: Image[]; | ||
public sections?: MediaMetadata[]; | ||
public title?: string; | ||
|
||
constructor (public containerType: ContainerType | ||
= ContainerType.GENERIC_CONTAINER) {} | ||
} |
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,8 @@ | ||
"use strict"; | ||
|
||
export default class LiveSeekableRange { | ||
constructor (public start?: number | ||
, public end?: number | ||
, public isMovingWindow?: boolean | ||
, public isLiveDone?: boolean) {} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"use strict"; | ||
|
||
import { MetadataType } from "../enums"; | ||
|
||
|
||
export default class MediaMetadata { | ||
public queueItemId?: number; | ||
public sectionDuration?: number; | ||
public sectionStartAbsoluteTime?: number; | ||
public sectionStartTimeInContainer?: number; | ||
public sectionStartTimeInMedia?: number; | ||
public type: MetadataType; | ||
public metadataType: MetadataType; | ||
|
||
constructor (type: MetadataType) { | ||
this.type = type; | ||
this.metadataType = type; | ||
} | ||
} |
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,18 @@ | ||
"use strict"; | ||
|
||
import QueueItem from "./QueueItem"; | ||
|
||
import { RepeatMode } from "../enums"; | ||
|
||
|
||
export default class QueueData { | ||
public shuffle = false; | ||
|
||
constructor(public id?: string | ||
, public name?: string | ||
, public description?: string | ||
, public repeatMode?: RepeatMode | ||
, public items?: QueueItem[] | ||
, public startIndex?: number | ||
, public startTime?: number) {} | ||
} |
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,10 @@ | ||
"use strict"; | ||
|
||
import { UserAction } from "../enums"; | ||
|
||
|
||
export default class UserActionState { | ||
public customData: any = null; | ||
|
||
constructor (public userAction: UserAction) {} | ||
} |
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,6 @@ | ||
"use strict"; | ||
|
||
export default class VastAdsRequest { | ||
public adsResponse?: string; | ||
public adTagUrl?: string; | ||
} |
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,10 @@ | ||
"use strict"; | ||
|
||
import { HdrType } from "../enums"; | ||
|
||
|
||
export default class VideoInformation { | ||
constructor (public width: number | ||
, public height: number | ||
, public hdrType: HdrType) {} | ||
} |
Oops, something went wrong.