{"_id":"@codelab/nativescript-cast","_rev":"2-a832d6fa6c0a61c8a7b6845539bcdba0","name":"@codelab/nativescript-cast","dist-tags":{"latest":"0.4.1"},"versions":{"0.4.0":{"name":"@codelab/nativescript-cast","version":"0.4.0","description":"NativeScript Chromecast Plugin.","main":"cast","typings":"cast.d.ts","nativescript":{"platforms":{"android":"7.0.0","ios":"7.0.0"}},"scripts":{"tsc":"tsc","build":"npm run tsc && npm run build.native && npm run build.angular","build.native":"node scripts/build-native.js","build.angular":"node ./angular/build.ts","postclone":"npm i && node scripts/postclone.js && cd ../demo && npm i && npx rimraf -- package-lock.json && cd ../src","test.android":"npm run tsc && npm run tslint && cd ../demo && ns build android && ns test android --justlaunch","test.ios":"npm run tsc && npm run tslint && cd ../demo && ns build ios && ns test ios --justlaunch","tslint":"cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\"","plugin.tscwatch":"npm run tsc -- -w","demo.android":"npm run tsc && cd ../demo && ns run android --no-hmr","demo.ios":"npm run tsc && cd ../demo && ns run ios","demo.reset":"cd ../demo && npx rimraf -- hooks node_modules platforms package-lock.json","demo-angular.android":"npm run tsc && cd ../demo-angular && ns run android","demo-angular.ios":"npm run tsc && cd ../demo-angular && ns run ios","demo-angular.reset":"cd ../demo-angular && npx rimraf -- hooks node_modules platforms package-lock.json","plugin.prepare":"npm run build && cd ../demo && ns plugin remove @codelab/nativescript-cast && ns plugin add ../src && cd ../demo-angular && ns plugin remove @codelab/nativescript-cast && ns plugin add ../src","setup":"npm i && npm run ts-patch","ts-patch":"ts-patch install","clean":"npm run demo.reset && npm run demo-angular.reset && npx rimraf -- node_modules package-lock.json && npm run setup","ci.tslint":"npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**'","prepack":"npm run build.native"},"keywords":["NativeScript","JavaScript","Android","iOS","Chromecast","Cast"],"author":{"name":"Lochlan McBride","email":"lochlan@gmail.com"},"bugs":{"url":"https://github.com/lochstar/nativescript-cast/issues"},"license":"Apache-2.0","homepage":"https://github.com/lochstar/nativescript-cast","devDependencies":{"@angular/common":"^10.2.1","@angular/compiler":"^10.2.1","@angular/compiler-cli":"^10.2.1","@angular/core":"^10.2.1","@nativescript/angular":"^10.1.7","@nativescript/core":"^7.0.13","@nativescript/types":"^7.0.4","@nativescript/webpack":"^3.0.8","lodash":"^4.17.15","ng-packagr":"^10.1.2","prompt":"^1.0.0","rimraf":"^2.6.2","semver":"^5.6.0","ts-patch":"^1.3.0","tslint":"^5.20.0","typescript":"^4.0.5"},"bootstrapper":"nativescript-plugin-seed","dependencies":{"ts-node":"^9.0.0"},"_resolved":"","_integrity":"","_from":"file:codelab-nativescript-cast-0.4.0.tgz","_id":"@codelab/nativescript-cast@0.4.0","_nodeVersion":"14.15.0","_npmVersion":"6.14.9","dist":{"integrity":"sha512-XundWeActfKEYOnDUhtmBtJzk8VVi4ZiIBB8gEcnPLXUZe9ialQtcm9U2FWRnrUE7XSuwMncQ/z136isgygFIg==","shasum":"432117d510a24cac6d43a677dbedb226645700b3","tarball":"https://registry.npmjs.org/@codelab/nativescript-cast/-/nativescript-cast-0.4.0.tgz","fileCount":462,"unpackedSize":61873511,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2VzZCRA9TVsSAnZWagAAsEYP/Aodi/o32xAFJmk6+ixH\nOXKSmfYs5PQ0CRL8XbYTvDfkmc59e5BTusIvsztuZ+l8eWQ42gKsCj2tffvL\ngJuWDDpM6T69y9AtZXQQNYpShQRpfR1SVmmjzs/8VsgnIiqeX8b/WuGeGN2Y\n8loRdWrUo8lnE8BiQCgBBcgrMFmo1Yj/86Tbb2icQj4+rxwiUwnxWwbG/e8o\nJW6Kuoh5/J3uZ2VfCKWYjUSNy9lTPU6XwdxoOyMHCmljwD2jOXmK8viDk4Hn\nGDWPUy2wyO4VDvSRYV+G8Q0jWWMfuqSB7r9IMwfrOJbxSPzXknVedc9+jeQv\nkghJ26nYP2TB2X61dnY6h9ib0gNCJEG3ATNFMuLfOS5//joLXUpVrfl4bbeI\ntGpgEGRSMLREoPlGMQt1P/WgBU0F6Ua5suiouSqtKqK+6LT7V4GZlx9fMm1N\nKXVDvz87FkVt4Nq/+bZURMDyvD3jdh/GCTnZjNi7bWj3RB+egmjkXZC51Ih4\nL9lb7+Y8W1yrbpTerl5L7ZpEyDA1qpMgKTd0RSPnNJHhcfe4sRM6Ia5WCUT/\nHcqBVU2d6myzAQ84qzCw1TxLTNe8jjfaQjXQqjpdyJrIU0MRQ2PFw3/KTo3L\naHNlQ+2RYjoN7bfF4Xo8kN5DiELigbdgfGnLKTN7bKuzLGJtth3f7qf5HrpW\n1PzJ\r\n=QYY9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIDZk/rrdx8rOQlW0xXKDWdCDIE2Hir57DTEncFO+r5bTAh9Pk1zaDURfZ40K0WeZDIuoCKVpTFitwFJX9A2uiRZQ"}]},"_npmUser":{"name":"lochstar","email":"lochlan@gmail.com"},"directories":{},"maintainers":[{"name":"mattknox","email":"matt@codelab.com.au"},{"name":"lochstar","email":"lochlan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nativescript-cast_0.4.0_1608080600662_0.5039512096889127"},"_hasShrinkwrap":false},"0.4.1":{"name":"@codelab/nativescript-cast","version":"0.4.1","description":"NativeScript Chromecast Plugin.","main":"cast","typings":"cast.d.ts","nativescript":{"platforms":{"android":"7.0.0","ios":"7.0.0"}},"scripts":{"tsc":"tsc","build":"npm run tsc && npm run build.native && npm run build.angular","build.native":"node scripts/build-native.js","build.angular":"node ./angular/build.ts","postclone":"npm i && node scripts/postclone.js && cd ../demo && npm i && npx rimraf -- package-lock.json && cd ../src","test.android":"npm run tsc && npm run tslint && cd ../demo && ns build android && ns test android --justlaunch","test.ios":"npm run tsc && npm run tslint && cd ../demo && ns build ios && ns test ios --justlaunch","tslint":"cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\"","plugin.tscwatch":"npm run tsc -- -w","demo.android":"npm run tsc && cd ../demo && ns run android --no-hmr","demo.ios":"npm run tsc && cd ../demo && ns run ios","demo.reset":"cd ../demo && npx rimraf -- hooks node_modules platforms package-lock.json","demo-angular.android":"npm run tsc && cd ../demo-angular && ns run android","demo-angular.ios":"npm run tsc && cd ../demo-angular && ns run ios","demo-angular.reset":"cd ../demo-angular && npx rimraf -- hooks node_modules platforms package-lock.json","plugin.prepare":"npm run build && cd ../demo && ns plugin remove @codelab/nativescript-cast && ns plugin add ../src && cd ../demo-angular && ns plugin remove @codelab/nativescript-cast && ns plugin add ../src","setup":"npm i && npm run ts-patch","ts-patch":"ts-patch install","clean":"npm run demo.reset && npm run demo-angular.reset && npx rimraf -- node_modules package-lock.json && npm run setup","ci.tslint":"npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**'","prepack":"npm run build.native"},"keywords":["NativeScript","JavaScript","Android","iOS","Chromecast","Cast"],"author":{"name":"Lochlan McBride","email":"lochlan@gmail.com"},"bugs":{"url":"https://github.com/lochstar/nativescript-cast/issues"},"license":"Apache-2.0","homepage":"https://github.com/lochstar/nativescript-cast","devDependencies":{"@angular/common":"^10.2.1","@angular/compiler":"^10.2.1","@angular/compiler-cli":"^10.2.1","@angular/core":"^10.2.1","@nativescript/angular":"^10.1.7","@nativescript/core":"^7.0.13","@nativescript/types":"^7.0.4","@nativescript/webpack":"^3.0.8","lodash":"^4.17.15","ng-packagr":"^10.1.2","prompt":"^1.0.0","rimraf":"^2.6.2","semver":"^5.6.0","ts-patch":"^1.3.0","tslint":"^5.20.0","typescript":"^4.0.5"},"bootstrapper":"nativescript-plugin-seed","dependencies":{"ts-node":"^9.0.0"},"_resolved":"","_integrity":"","_from":"file:codelab-nativescript-cast-0.4.1.tgz","_id":"@codelab/nativescript-cast@0.4.1","_nodeVersion":"14.15.0","_npmVersion":"6.14.9","dist":{"integrity":"sha512-BDRvi5TOygX6wOMHJtQWj4OjCvlD74SwsykyvbTSHVriYANYwZNsvWlPtgT1SxbN9y/zFABcXEx4EaRJOjYh+Q==","shasum":"c9cfc54b61dd1589c7fdd23ead2398bf8d432fce","tarball":"https://registry.npmjs.org/@codelab/nativescript-cast/-/nativescript-cast-0.4.1.tgz","fileCount":462,"unpackedSize":61873557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2obICRA9TVsSAnZWagAAadIP/R11G5yL4ValTtGqD7WC\nA1fZ8Fu7AzS7Vqy6U6hz2kWEKqAEeIQH0E0wjP8/sf0Wvk5y8uMOFwwoDJt9\ng1HpIYgHJepeZEonx1fWdUrTfgjmoIGF9KWh2FSsFdZpJOMHf5kebEyC/245\n/o3HKh2jeYACB+KLA1EaMM2HC63jA2n3aZF5GJSVOcr53SuY0ZsNf8pqbHnc\nfg83xBusCQAyY3RTm1m9Bi0Q3LwD8jg1lmHnoEBP04H1fD9N+E4xlKuN5uH9\nbd18bhNEkOfP+a9kgvzlURSSZ6fwjxWRl91/C+T/Hym7UUUu4Om6S04xnlKe\nB1d+CenJMYthibdqWgzg1jbuNI7/ctlUPWDTEnUBykKlfnq+jdcX0IVEJlpe\nQsaUk4V5wNlNqJnfoQT5Oskn5tezEkubt48a+fgh6NsJQnKSKNx0SuSHE/SE\nrEs2EYlTrC1idaE/yBUzrDpI5Rtv5Q6TqwvvBGBIqBVKUQNWo+7Xt6wDrjPg\nJQuj/2PBcU88k2JUPI+0T+KHiIKn7DG3rtEdXTWOGbt7Jubp+fpvXTPWawi4\n6zRFPDiQArtdV/mF89xb/OBTZSEZaGq8LLOC11TlDUWMQkh6XKvqVzVuF7EO\ngtxoqoiLjKdv3tN651K9ojNiHjG0JgOBeHgRL1C+wxe6UK2WiTsyAgV3UOLW\nKyfK\r\n=zD3d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFE8O0fMCyOMqTX8Dkd1tX/84zJq8td+6umWasUSagQLAiABPYt47sX7w3PoiwC4bhtd2GeoctbMiINHHEL79KabTw=="}]},"_npmUser":{"name":"lochstar","email":"lochlan@gmail.com"},"directories":{},"maintainers":[{"name":"mattknox","email":"matt@codelab.com.au"},{"name":"lochstar","email":"lochlan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nativescript-cast_0.4.1_1608156872145_0.34805479460140387"},"_hasShrinkwrap":false}},"time":{"created":"2020-12-16T01:03:20.453Z","0.4.0":"2020-12-16T01:03:21.196Z","modified":"2022-04-05T00:03:14.325Z","0.4.1":"2020-12-16T22:14:32.662Z"},"maintainers":[{"name":"mattknox","email":"matt@codelab.com.au"},{"name":"lochstar","email":"lochlan@gmail.com"}],"description":"NativeScript Chromecast Plugin.","homepage":"https://github.com/lochstar/nativescript-cast","keywords":["NativeScript","JavaScript","Android","iOS","Chromecast","Cast"],"author":{"name":"Lochlan McBride","email":"lochlan@gmail.com"},"bugs":{"url":"https://github.com/lochstar/nativescript-cast/issues"},"license":"Apache-2.0","readme":"# nativescript-cast\n\nChromecast support for NativeScript 7+.\n\n## Requirements\n\nYou must have a valid Chromecast Application ID. You can obtain one at the [Google Cast Developer Console](https://cast.google.com/publish/).\n\n## Installation\n\nNote: Since NativeScript 7, the package name is now `@codelab/nativescript-cast`.\n\n```bash\n# NativeScript 7\nns plugin add @codelab/nativescript-cast\n\n# Nativescript 6\ntns plugin add nativescript-cast@0.3.0\n\n# NativeScript 5\ntns plugin add nativescript-cast@0.1.2\n```\n\n## Usage\n\n### Android\n\nSet your Application ID.\n\n```xml\n<!-- App_Resources/Android/src/main/res/values/strings.xml -->\n<string name=\"app_id\">4F8B3483</string>\n```\n\nThe Google Cast design checklist requires a sender app to provide an expanded controller. Include `ExpandedControllerActivity` in your `AndroidManifest.xml`.\n\n```xml\n<!-- App_Resources/Android/src/main/res/AndroidManifest.xml -->\n<activity\n  android:name=\"com.google.android.gms.cast.framework.media.widget.ExpandedControllerActivity\"\n  android:label=\"@string/app_name\"\n  android:launchMode=\"singleTask\"\n  android:screenOrientation=\"portrait\">\n  <intent-filter>\n    <action android:name=\"android.intent.action.MAIN\"/>\n  </intent-filter>\n  <meta-data\n    android:name=\"android.support.PARENT_ACTIVITY\"\n    android:value=\"com.tns.NativeScriptActivity\"/>\n</activity>\n```\n\nIf you are using Webpack, you will need to include `'@codelab/nativescript-cast/cast-options-provider'` in `appComponents`.\n\nTo do this, create a [custom webpack configuration](https://docs.nativescript.org/tooling/custom-webpack-configuration). See the [demo](demo/webpack.config.custom.js) for an example.\n\n---\n\n### iOS\n\nSet your Application ID.\n\n```xml\n<!-- App_Resources/iOS/Info.plist -->\n<key>AppID</key>\n<string>4F8B3483</string>\n```\n\nYou'll need to set up a delegate to initialise the `GCKCastContext` with your `AppID`. See the [demo](demo/app/app.ts) for an example.\n\n```ts\nimport { Application } from '@nativescript/core';\n\nif (global.isIOS) {\n  @NativeClass()\n  class MyDelegate extends UIResponder implements UIApplicationDelegate {\n    public static ObjCProtocols = [UIApplicationDelegate, GCKLoggerDelegate];\n\n    applicationDidFinishLaunchingWithOptions(application: UIApplication, launchOptions: NSDictionary<string, any>): boolean {\n      const appId = NSBundle.mainBundle.objectForInfoDictionaryKey('AppID');\n      const castOptions = GCKCastOptions.alloc().initWithReceiverApplicationID(appId);\n      GCKCastContext.setSharedInstanceWithOptions(castOptions);\n\n      // Optional logger\n      const delegate: MyLoggerDelegateImpl = MyLoggerDelegateImpl.new();\n      GCKLogger.sharedInstance().delegate = delegate;\n\n      return true;\n    }\n  }\n\n  Application.ios.delegate = MyDelegate;\n}\n```\n\n#### ⚠️ iOS 12+ & Xcode 10 ⚠️\n\nIf developing using Xcode 10 and targeting iOS devices running iOS 12 or higher, the \"Access WiFi Information\" capability is required in order to discover and connect to Cast devices. The plugin comes with an `app.entitlements` which will add this capability to the workspace, however, you must also `Add the Access WiFi information feature to your App ID` .\n\nSee [iOS sender setup](https://developers.google.com/cast/docs/ios_sender/) for more info.\n\n#### ⚠️ iOS 13+ & Guest Mode ⚠️\n\niOS 13+ requires Bluetooth and Microphone permissions in order to use Guest Mode with Chromecast. This plugin sets these permissions in the `Info.plist` file.\n\nSee [iOS Guest Mode](https://developers.google.com/cast/docs/guest_mode#ios_guest_mode) for more info.\n\n#### ⚠️ iOS 14+ ⚠️\n\niOS 14+ has some permission changes. See [iOS Permission Changes](https://developers.google.com/cast/docs/ios_sender/ios_permissions_changes#ios_14) for more info.\n\nBe sure to set `NSBonjourServices` with your `AppID` as explained in the documentation above. See the [demo](demo/app/App_Resources/iOS/Info.plist#L25-32) for an example.\n\n---\n\n### Place `CastButton` in to your view.\n\n#### NativeScript\n\n```xml\n<Page\n  xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n  loaded=\"pageLoaded\"\n  class=\"page\"\n  xmlns:cast=\"@codelab/nativescript-cast\"\n>\n  <ActionBar title=\"App Name\">\n    <ActionItem ios.position=\"right\">\n      <StackLayout>\n        <cast:CastButton cast=\"{{ handleCastEvent }}\" />\n      </StackLayout>\n    </ActionItem>\n  </ActionBar>\n  <!-- ... -->\n</Page>\n```\n\n#### Angular\n\nAdd `NativescriptCastModule` in your app's module `imports`, typically in `app.module.ts`.\n\n```ts\nimport { NativescriptCastModule } from '\"@codelab/nativescript-cast/angular';\n\n@NgModule({\n  imports: [\n    NativescriptCastModule\n  ]\n});\n```\n\nInclude in your template.\n\n```html\n<ActionBar [title]=\"App Name\" >\n  <ActionItem ios.position=\"right\">\n    <StackLayout>\n      <CastButton (cast)=\"handleCastEvent($event)\"></CastButton>\n    </StackLayout>\n  </ActionItem>\n</ActionBar>\n```\n\n#### Vue\n\nRegister the element in your app's main entry point, typically `main.ts`.\n\n```js\nVue.registerElement('CastButton', () => require('n\"@codelab/ativescript-cast').CastButton);\n```\n\nInclude in your template.\n\n```xml\n<ActionBar title=\"App Name\">\n  <ActionItem ios.position=\"right\">\n    <StackLayout>\n      <CastButton @cast=\"handleCastEvent\" />\n    </StackLayout>\n  </ActionItem>\n</ActionBar>\n\n```\n\n#### Event handler\n\nSet up an event handler for all cast [events](#events). The cast instance is available on `args.object`.\n\n```ts\nhandleCastEvent(args): void {\n  console.log('cast: ' + args.object);\n  console.log('eventName: ' + args.data.eventName);\n}\n```\n\n#### Casting\n\nWhen the Cast receiver is ready, you can load your media.\n\n```ts\nconst mediaInfo = {\n  contentId: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4',\n  contentType: 'video/mp4',\n  streamType: 'BUFFERED',\n  duration: undefined,\n  metadata: {\n    metadataType: 'MOVIE',\n    title: 'Tears of Steel',\n    subtitle: 'By Blender Foundation',\n    description: 'Sintel is an independently produced short film, initiated by the Blender Foundation.',\n    images: [\n      {\n        url: 'http://storage.googleapis.com/gtv-videos-bucket/sample/images_480x270/TearsOfSteel.jpg',\n        width: 480,\n        height: 270,\n      }\n    ]\n  },\n  textTracks: [\n    {\n      src: 'https://amssamples.streaming.mediaservices.windows.net/bc57e088-27ec-44e0-ac20-a85ccbcd50da/TOS-en.vtt',\n      contentType: 'text/vtt',\n      name: 'English',\n      language: 'en'\n    },\n    {\n      src: 'https://amssamples.streaming.mediaservices.windows.net/bc57e088-27ec-44e0-ac20-a85ccbcd50da/TOS-es.vtt',\n      contentType: 'text/vtt',\n      name: 'Spanish',\n      language: 'es'\n    }\n  ],\n  textTrackStyle: {\n    foregroundColor: '#0000cc',\n    backgroundColor: '#00cc00',\n  },\n  customData: {\n    anything: 'you like'\n  }\n};\n\ncast.loadMedia(mediaInfo);\n```\n\n## API\n\n### <a name=\"events\"></a>Events\n\nEvent names follow the Android naming structure.\niOS events are passed from `GCKSessionManagerListener`, `GCKRemoteMediaClientListener` and `GCKMediaQueueDelegate`.\nAndroid events are passed from `SessionManagerListener`, `MediaRouter.Callback` and `MediaQueue.Callback`.\n\n| NativeScript             | Android                | iOS                                          |\n| ------------------------ | ---------------------- | -------------------------------------------- |\n| onSessionEnded           | onSessionEnded         | didEndSession                                |\n| onSessionEnding          | onSessionEnding        | willEndSession                               |\n| onSessionResumed         | onSessionResumed       | didResumeSession                             |\n| onSessionResuming        | onSessionResuming      | willResumeSession                            |\n| onSessionStarted         | onSessionStarted       | didStartSession                              |\n| onSessionStartFailed     | onSessionStartFailed   | didFailToStartSession                        |\n| onSessionStarting        | onSessionStarting      | willStartSession                             |\n| onSessionSuspended       | onSessionSuspended     | didSuspendSession                            |\n| onDeviceVolumeChanged    | onRouteVolumeChanged   | didReceiveDeviceVolume                       |\n| onDeviceChanged          | onRouteChanged         | didUpdateDevice                              |\n| onMediaStatusChanged     | onStatusUpdated        | remoteMediaClientDidUpdateMediaStatus        |\n| mediaQueueWillChange     | mediaQueueWillChange   | mediaQueueWillChange                         |\n| itemsReloaded            | itemsReloaded          | mediaQueueDidReloadItems                     |\n| itemsInsertedInRange     | itemsInsertedInRange   | didInsertItemsInRange                        |\n| itemsUpdatedAtIndexes    | itemsUpdatedAtIndexes  | didUpdateItemsAtIndexes                      |\n| itemsRemovedAtIndexes    | itemsRemovedAtIndexes  | didRemoveItemsAtIndexes                      |\n| mediaQueueChanged        | mediaQueueChanged      | mediaQueueDidChange                          |\n\nAll unlisted events are ignored. See related documentation for futher details.\n\n#### Android\n\n  - [SessionManagerListener](https://developers.google.com/android/reference/com/google/android/gms/cast/framework/SessionManagerListener)\n  - [MediaRouter.Callback](https://developer.android.com/reference/androidx/mediarouter/media/MediaRouter.Callback?hl=id)\n  - [MediaQueue.Callback](https://developers.google.com/android/reference/com/google/android/gms/cast/framework/media/MediaQueue.Callback)\n\n### iOS\n\n  - [GCKSessionManagerListener](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_session_manager_listener-p)\n  - [GCKRemoteMediaClientListener](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_remote_media_client_listener-p)\n  - [GCKMediaQueueDelegate](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_media_queue_delegate-p)\n\n### Methods\n\nSee [cast.types](src/cast.types.ts) for method options.\n\n- `loadMedia(media: CastMediaInfo, options?: LoadMediaOptions): void`\n\n  Loads the specified media.\n\n- `loadQueue(options: LoadQueueOptions): void`\n\n  Loads a queue of media items.\n\n- `playMedia(customData? any): void`\n\n  Plays the loaded media.\n\n- `pauseMedia(customData? any): void`\n\n  Pauses the loaded media.\n\n- `seekMedia(position: number, resumeState?: ResumeState , customData?: any): void`\n\n  Seeks the loaded media to position (seconds).\n\n- `stopMedia(customData? any): void`\n\n  Stops the loaded media.\n\n- `showController(): void`\n\n  Show the expanded controller.\n\n- `showCastInstructions(title: string, singleTime: boolean): void`\n\n  Shows the Cast instructions overlay. `title` and `singleTime` arguments are Android-only.\n\n- `showCastDialog(): void`\n\n  Show the Cast destination dialog.\n\n- `getMediaInfo(): CastMediaInfo`\n\n  Returns the loaded media info.\n\n- `setActiveTrackIds([trackIds]): void`\n\n  Pass an array of IDs defined in `textTracks` to show subtitles. Pass an empty array to hide.\n\n- `queueNextItem(): void`\n\n  Play the next item in the queue.\n\n- `queuePreviousItem(): void`\n\n  Play the previous item in the queue.\n\n- `queueSetRepeatMode(repeatMode: RepeatMode): void`\n\n  Set the queue repeat mode.\n\n- `queueInsertItem(options: QueueInsertItemOptions): void`\n\n  Insert a single queue item.\n\n- `queueInsertItems(options: QueueInsertItemsOptions): void`\n\n  Insert multiple queue items.\n\n- `queueRemoveItems(itemIDs: number[], customData?: any): void`\n\n  Remove queue items by ID.\n\n- `queueReorderItems(itemIDs: number[], beforeItemID: number, customData?: any): void`\n\n  Reorder queue items by ID.\n\n- `queueJumpToItem(itemID: number, playPosition?: number, customData? any): void`\n\n  Jump to queue item by ID.\n\n## TODO\n\n- More queue-related functions.\n- Complete [Cast Reference app](https://developers.google.com/cast/docs/downloads) that adheres to the [Google Cast Design Checklist](https://developers.google.com/cast/docs/design_checklist/sender).\n\n## Acknowledgements\n\n- [CodeLab](https://www.codelab.com.au/) - Current employer. Developed this plugin whilst learning NativeScript.\n- [loop.tv](https://loop.tv/) - Financed the development of Queue Support.\n","readmeFilename":"README.md"}