-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #431 from THEOplayer/feature/sdk_versions
Feature/sdk versions
- Loading branch information
Showing
16 changed files
with
79 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,3 +80,5 @@ _site/ | |
Gemfile.lock | ||
vendor | ||
.bundle | ||
src/manifest.json | ||
e2e/cavy_results.md |
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,13 @@ | ||
import { TestScope } from 'cavy'; | ||
import { sdkVersions } from 'react-native-theoplayer'; | ||
import { expect } from '../utils/Actions'; | ||
|
||
export default function (spec: TestScope) { | ||
spec.describe('Query SDK version info', function () { | ||
spec.it('returns correct React Native and native SDK versions.', async function () { | ||
const versions = await sdkVersions(); | ||
expect(versions.rn.length).toBeTruthy(); | ||
expect(versions.native?.length).toBeTruthy(); | ||
}); | ||
}); | ||
} |
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
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 @@ | ||
const manifest = { | ||
version: process.env.npm_package_version, | ||
buildDate: new Date().toISOString(), | ||
}; | ||
|
||
console.log(JSON.stringify(manifest)); |
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 @@ | ||
export * from './SdkVersions'; |
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,12 @@ | ||
import { NativeModules } from 'react-native'; | ||
import type { SdkVersions } from 'react-native-theoplayer'; | ||
import * as manifest from '../../manifest.json'; | ||
|
||
export const sdkVersions = async (): Promise<SdkVersions> => { | ||
const rnVersionString = manifest.version ?? ''; | ||
const nativeVersionString = await NativeModules.THEORCTPlayerModule.version(); | ||
return { | ||
rn: rnVersionString, | ||
native: nativeVersionString, | ||
}; | ||
}; |
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 @@ | ||
import { SdkVersions } from 'react-native-theoplayer'; | ||
import { version as nativeVersionString } from 'theoplayer'; | ||
import manifest from '../../manifest.json'; | ||
|
||
export const sdkVersions = async (): Promise<SdkVersions> => { | ||
const rnVersionString = manifest.version ?? ''; | ||
return { | ||
rn: rnVersionString, | ||
native: nativeVersionString, | ||
}; | ||
}; |