{"_id":"@bitmovin/player-react-native-google-dai","_rev":"11-c2fdb3fcfe9c32c65e5499306bc55ca4","name":"@bitmovin/player-react-native-google-dai","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@bitmovin/player-react-native-google-dai","version":"0.1.0","keywords":["react-native","expo","bitmovin","player","google-dai","ima","ssai"],"author":{"url":"https://github.com/bitmovin","name":"Bitmovin GmbH","email":"player-sdks@bitmovin.com"},"license":"MIT","_id":"@bitmovin/player-react-native-google-dai@0.1.0","maintainers":[{"name":"bitadmin","email":"admin@bitmovin.com"},{"name":"mimoza","email":"vojtech.zalesky@gmail.com"},{"name":"lkroepfl","email":"lukas.kroepfl@bitmovin.com"}],"homepage":"https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai#readme","bugs":{"url":"https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai/issues"},"dist":{"shasum":"cddd11186d0b12af665518af760b8ad7d74bb7c7","tarball":"https://registry.npmjs.org/@bitmovin/player-react-native-google-dai/-/player-react-native-google-dai-0.1.0.tgz","fileCount":30,"integrity":"sha512-t3gLAs7XvMaCxzcwXWENf+qoxmyxetkxqH4sdU1KgYxNCoejEat+NdE98N0aXOesBxwF/ZouBKQSsPYYiUBnpw==","signatures":[{"sig":"MEUCIGfiKzlcUWsm6qqBFqZ2NSi+b5Gy4lah3q512UnWnZozAiEA2aMPolkFAMowYcvc9Fam6k0svBJykB+5I7OVvZKZuh8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60751},"main":"build/index.js","types":"build/index.d.ts","module":"expo-module","gitHead":"850a3afefcd8c1ec04f3f03358c68175a17895f1","scripts":{"lint":"eslint --quiet src --ext .ts","build":"expo-module build","clean":"expo-module clean","prepare":"expo-module prepare","typecheck":"tsc --noEmit -p tsconfig.json","example:ios":"yarn --cwd example ios","example:lint":"yarn --cwd example lint","example:start":"yarn --cwd example start","prepublishOnly":"expo-module prepublishOnly","example:android":"yarn --cwd example android","example:install":"yarn --cwd example install","example:prebuild":"yarn --cwd example prebuild","example:typecheck":"yarn --cwd example typecheck"},"_npmUser":{"name":"bitadmin","email":"admin@bitmovin.com"},"repository":{"url":"git+https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai.git","type":"git"},"_npmVersion":"11.6.1","description":"Optional Google IMA DAI companion package for Bitmovin Player React Native.","directories":{},"resolutions":{"postcss":"8.5.26","**/xcode/uuid":"11.1.1"},"_nodeVersion":"24.11.0","dependencies":{"expo-crypto":"~15.0.9","expo-modules-core":"~3.0.30"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"expo":"~54.0.35","react":"19.1.0","eslint":"^8.57.0","prettier":"^3.6.2","typescript":"~5.9.2","@babel/core":"^7.28.0","@types/react":"~19.1.10","react-native":"0.81.5","eslint-config-expo":"~10.0.0","expo-module-scripts":"^4.1.9","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.5.1"},"peerDependencies":{"expo":">=54.0.0","react":"*","expo-crypto":">=14.0.0","react-native":"*","bitmovin-player-react-native":">=1.22.0"},"_npmOperationalInternal":{"tmp":"tmp/player-react-native-google-dai_0.1.0_1786085583458_0.9489870909938198","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bitmovin/player-react-native-google-dai","version":"0.2.0","keywords":["react-native","expo","bitmovin","player","google-dai","ima","ssai"],"author":{"url":"https://github.com/bitmovin","name":"Bitmovin GmbH","email":"player-sdks@bitmovin.com"},"license":"MIT","_id":"@bitmovin/player-react-native-google-dai@0.2.0","maintainers":[{"name":"bitadmin","email":"admin@bitmovin.com"},{"name":"mimoza","email":"vojtech.zalesky@gmail.com"},{"name":"lkroepfl","email":"lukas.kroepfl@bitmovin.com"},{"name":"lukas_kg","email":"lukas@k-g.io"}],"homepage":"https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai#readme","bugs":{"url":"https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai/issues"},"dist":{"shasum":"6e3a426880b14ee35b198bc059b11bf5c7158102","tarball":"https://registry.npmjs.org/@bitmovin/player-react-native-google-dai/-/player-react-native-google-dai-0.2.0.tgz","fileCount":30,"integrity":"sha512-7cKgL1Df5zAF+EdS+FPydluCs8fxqUYHPD8PhlgWCYw4Y2kZRZUga/dwtTWO74vzxodOCGBhx7BMXNJbAdqH8A==","signatures":[{"sig":"MEQCIFPzhomcmyb0DHI+UlcdelhwnKE2QJ4FGkeVYKNEBKuCAiBF+GxWkSIL27xbesHrkYcWyFow2vE/Z+ax2E+/kacMxQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bitmovin%2fplayer-react-native-google-dai@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":61645},"main":"build/index.js","types":"build/index.d.ts","module":"expo-module","gitHead":"8e4767e1861972e43273b8e9fde21308f68fe117","scripts":{"lint":"eslint --quiet src --ext .ts","build":"expo-module build","clean":"expo-module clean","prepare":"expo-module prepare","typecheck":"tsc --noEmit -p tsconfig.json","example:ios":"yarn --cwd example ios","example:lint":"yarn --cwd example lint","example:start":"yarn --cwd example start","prepublishOnly":"expo-module prepublishOnly","example:android":"yarn --cwd example android","example:install":"yarn --cwd example install","example:prebuild":"yarn --cwd example prebuild","example:typecheck":"yarn --cwd example typecheck"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9b692d36-4bc1-4e45-a660-b654f3b19fa4"}},"repository":{"url":"git+https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai.git","type":"git"},"_npmVersion":"11.17.0","description":"Optional Google IMA DAI companion package for Bitmovin Player React Native.","directories":{},"resolutions":{"postcss":"8.5.26","**/xcode/uuid":"11.1.1"},"_nodeVersion":"24.19.0","dependencies":{"expo-crypto":"~15.0.9","expo-modules-core":"~3.0.30"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"expo":"~54.0.35","react":"19.1.0","eslint":"^8.57.0","prettier":"^3.6.2","typescript":"~5.9.2","@babel/core":"^7.28.0","@types/react":"~19.1.10","react-native":"0.81.5","eslint-config-expo":"~10.0.0","expo-module-scripts":"^4.1.9","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.5.1"},"peerDependencies":{"expo":">=54.0.0","react":"*","expo-crypto":">=14.0.0","react-native":"*","bitmovin-player-react-native":">=1.22.0"},"_npmOperationalInternal":{"tmp":"tmp/player-react-native-google-dai_0.2.0_1786537508260_0.9820274117975583","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@bitmovin/player-react-native-google-dai","version":"0.3.0","keywords":["react-native","expo","bitmovin","player","google-dai","ima","ssai"],"author":{"url":"https://github.com/bitmovin","name":"Bitmovin GmbH","email":"player-sdks@bitmovin.com"},"license":"MIT","_id":"@bitmovin/player-react-native-google-dai@0.3.0","maintainers":[{"name":"bitadmin","email":"admin@bitmovin.com"},{"name":"jf-bitmovin","email":"jakov.fustin@bitmovin.com"},{"name":"mimoza","email":"vojtech.zalesky@gmail.com"},{"name":"lkroepfl","email":"lukas.kroepfl@bitmovin.com"},{"name":"lukas_kg","email":"lukas@k-g.io"}],"homepage":"https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai#readme","bugs":{"url":"https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai/issues"},"dist":{"shasum":"92713d24bafcf12d54badde784881e37c4d888be","tarball":"https://registry.npmjs.org/@bitmovin/player-react-native-google-dai/-/player-react-native-google-dai-0.3.0.tgz","fileCount":30,"integrity":"sha512-mzTf64K8fIpclRVdgpXFtO+n+eD9DZtYvJchf+9NlJLO/rWlgf8zQEgl7jzQdSrCzWuEDBHSzg7tfNMpmdc9rQ==","signatures":[{"sig":"MEUCIQDEGrqlIQYd1g4ojq8E/vsqucmys08h16Da6Wa/ECWQkwIgRcXiGyFzo9iHDWopf7f7R6F8+rFblpMoSl/mLVD+4OA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bitmovin%2fplayer-react-native-google-dai@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":62552},"main":"build/index.js","types":"build/index.d.ts","module":"expo-module","gitHead":"fccffebf6dbdc262f2d227376d4b814b81f2f588","scripts":{"lint":"eslint --quiet src --ext .ts","build":"expo-module build","clean":"expo-module clean","prepare":"expo-module prepare","typecheck":"tsc --noEmit -p tsconfig.json","example:ios":"yarn --cwd example ios","example:lint":"yarn --cwd example lint","example:start":"yarn --cwd example start","prepublishOnly":"expo-module prepublishOnly","example:android":"yarn --cwd example android","example:install":"yarn --cwd example install","example:prebuild":"yarn --cwd example prebuild","example:typecheck":"yarn --cwd example typecheck"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9b692d36-4bc1-4e45-a660-b654f3b19fa4"}},"repository":{"url":"git+https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai.git","type":"git"},"_npmVersion":"11.17.0","description":"Optional Google IMA DAI companion package for Bitmovin Player React Native.","directories":{},"resolutions":{"postcss":"8.5.26","**/xcode/uuid":"11.1.1"},"_nodeVersion":"24.19.0","dependencies":{"expo-crypto":"~15.0.9","expo-modules-core":"~3.0.30"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"expo":"~54.0.35","react":"19.1.0","eslint":"^8.57.0","prettier":"^3.6.2","typescript":"~5.9.2","@babel/core":"^7.28.0","@types/react":"~19.1.10","react-native":"0.81.5","eslint-config-expo":"~10.0.0","expo-module-scripts":"^4.1.9","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.5.1"},"peerDependencies":{"expo":">=54.0.0","react":"*","expo-crypto":">=14.0.0","react-native":"*","bitmovin-player-react-native":">=1.25.0"},"_npmOperationalInternal":{"tmp":"tmp/player-react-native-google-dai_0.3.0_1786691144039_0.9415991663742214","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-08-07T06:53:03.299Z","modified":"2026-09-08T09:53:24.933Z","0.1.0":"2026-08-07T06:53:03.616Z","0.2.0":"2026-08-12T12:25:08.414Z","0.3.0":"2026-08-14T07:05:44.188Z"},"bugs":{"url":"https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai/issues"},"author":{"url":"https://github.com/bitmovin","name":"Bitmovin GmbH","email":"player-sdks@bitmovin.com"},"license":"MIT","homepage":"https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai#readme","keywords":["react-native","expo","bitmovin","player","google-dai","ima","ssai"],"repository":{"url":"git+https://github.com/bitmovin/bitmovin-player-react-native-integrations-google-dai.git","type":"git"},"description":"Optional Google IMA DAI companion package for Bitmovin Player React Native.","maintainers":[{"email":"admin@bitmovin.com","name":"bitadmin"},{"email":"jakov.fustin@bitmovin.com","name":"jf-bitmovin"},{"email":"vojtech.zalesky@gmail.com","name":"mimoza"},{"email":"jakob.mayring@bitmovin.com","name":"jmayring"},{"email":"lukas.knoch-girstmair@bitmovin.com","name":"l_kg"},{"email":"daniel.weinberger@bitmovin.com","name":"dweinber"},{"email":"lukas.kroepfl@bitmovin.com","name":"lkroepfl"}],"readme":"# Bitmovin Player React Native Google DAI\n\nOptional companion package for Google IMA Dynamic Ad Insertion (DAI/SSAI) support in `bitmovin-player-react-native`.\n\n## Installation\n\n```sh\nyarn add bitmovin-player-react-native @bitmovin/player-react-native-google-dai\n```\n\nThe package is an Expo module; Expo autolinking handles native installation.\n\n### iOS native dependency\n\nThe native Google DAI integration is distributed as a tagged CocoaPod outside of CocoaPods Trunk. Expo autolinking discovers this React Native module, but it cannot determine the Git source of that native dependency. Therefore, iOS applications must declare `BitmovinGoogleDAIPlayer` as an extra pod through [`expo-build-properties`](https://docs.expo.dev/versions/latest/sdk/build-properties/).\n\nInstall the config plugin:\n\n```sh\nyarn expo install expo-build-properties\n```\n\nThen add the extra pod to the `plugins` section of `app.config.ts`:\n\n```ts\nconst config = {\n  // ...\n  plugins: [\n    [\n      'expo-build-properties',\n      {\n        ios: {\n          extraPods: [\n            {\n              name: 'BitmovinGoogleDAIPlayer',\n              git: 'https://github.com/bitmovin/bitmovin-player-ios-integrations-google-dai.git',\n              tag: '0.2.1',\n            },\n          ],\n        },\n      },\n    ],\n  ],\n};\n```\n\nIf the application already uses `expo-build-properties`, merge this entry into its existing `ios.extraPods` array. Then regenerate the native iOS project:\n\n```sh\nyarn expo prebuild --platform ios\n```\n\nDo not add the pod directly to the generated `ios/Podfile`; Expo prebuild can recreate that file.\n\n## Compatibility\n\n| Component                    | Requirement |\n| ---------------------------- | ----------- |\n| Bitmovin Player React Native | `>=1.25.0`  |\n| Expo                         | `>=54.0.0`  |\n| React Native                 | `>=0.75.0`  |\n\nAndroid consumers must include the Bitmovin public releases repository:\n\n```kotlin\nrepositories {\n    maven {\n        url = uri(\"https://artifacts.bitmovin.com/artifactory/public-releases\")\n    }\n}\n```\n\nAndroid release builds require core library desugaring for the Google IMA dependency. Expo apps using the `bitmovin-player-react-native` config plugin get this automatically; manual/native setups or Kotlin DSL Gradle files must configure it in the app module (`android/app/build.gradle(.kts)`):\n\n```kotlin\nandroid {\n    compileOptions {\n        isCoreLibraryDesugaringEnabled = true\n    }\n}\n\ndependencies {\n    coreLibraryDesugaring(\"com.android.tools:desugar_jdk_libs:2.1.5\")\n}\n```\n\nCompatible native Google DAI integrations and Android Player SDK versions are pinned by each package release and should not be overridden.\n\n## Usage\n\n```tsx\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { Player, PlayerView } from 'bitmovin-player-react-native';\nimport {\n  GoogleDaiSourceType,\n  withGoogleDai,\n} from '@bitmovin/player-react-native-google-dai';\n\nexport function GoogleDaiPlayer() {\n  const player = useMemo(\n    () =>\n      withGoogleDai(\n        new Player({\n          playbackConfig: {\n            isAutoplayEnabled: true,\n          },\n        })\n      ),\n    []\n  );\n\n  useEffect(() => {\n    return () => player.destroy();\n  }, [player]);\n\n  const loadGoogleDai = useCallback(() => {\n    void player.googleDai\n      .load({\n        kind: 'live',\n        assetKey: '...',\n        type: GoogleDaiSourceType.HLS,\n        apiKey: '...',\n        networkCode: '...',\n      })\n      .then(() => player.play())\n      .catch((error) => console.warn('Google DAI load failed', error));\n  }, [player]);\n\n  return (\n    <PlayerView\n      player={player}\n      onPlayerViewReady={loadGoogleDai}\n      onPlayerError={(event) => console.warn(event)}\n      onAdStarted={(event) => console.warn('ad started', event)}\n    />\n  );\n}\n```\n\n`withGoogleDai(player)` preserves the player identity and returns `Player & GoogleDaiCapability`. The native DAI adapter is initialized lazily by `player.googleDai.load()`. Call `load()` after `PlayerView.onPlayerViewReady`; it does not initialize the core player.\n\n## Source config\n\n```ts\nexport enum GoogleDaiSourceType {\n  /**\n   * @platform Android\n   */\n  DASH = 'dash',\n  HLS = 'hls',\n}\n\nexport interface GoogleDaiLiveSourceConfig {\n  kind: 'live';\n  assetKey: string;\n  type: GoogleDaiSourceType;\n  apiKey?: string;\n  networkCode?: string;\n  adTagParameters?: Record<string, string>;\n}\n```\n\nOnly live DAI streams are supported; VOD configurations are rejected. iOS supports HLS only; DASH is Android-only.\n\n> Note: Seeking or time-shifting back into an already-played Google DAI ad segment does not replay IMA ad lifecycle events. The media may play again, but ad events are emitted only according to Google IMA DAI tracking state.\n\n## Example app\n\nThis repository includes a minimal Expo dev-client sample under [`example/`](example/) that installs this package via `file:..`, configures the core `bitmovin-player-react-native` plugin with `BITMOVIN_PLAYER_LICENSE_KEY`, and loads Google's public live DAI HLS test stream.\n\n```sh\ncd example\nyarn install\ncp .env.example .env\n# edit .env and set BITMOVIN_PLAYER_LICENSE_KEY\nyarn prebuild\nyarn android\n# or\nyarn ios\n```\n\n## Contributing and license\n\nContributions are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md). This project is available under the [MIT License](LICENSE).\n","readmeFilename":"README.md"}