Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add custom image metadata option for iOS and add missing types for custom metadata properties #3280

Merged
merged 4 commits into from
Oct 7, 2023

Conversation

Duell10111
Copy link
Contributor

Update the documentation

Updated the API.md with the new imageMetadataUri

Provide an example of how to test the change

Can be tested in the tvOS example of the app

Describe the changes

Added a possibillity to modify the image metadata of a video shown in tvOS for example or the Now Playing area in iOS.

Created as descripted in the documentation of apple:
https://developer.apple.com/documentation/avkit/customizing_the_tvos_playback_experience#3820220

Copy link
Collaborator

@freeboub freeboub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor clarification expected, else this is ok for me

@@ -981,7 +981,7 @@ Platforms: iOS, Android

##### Overriding the metadata of a source

Provide an optional `title`, `subtitle` and/or `description` properties for the video.
Provide an optional `title`, `subtitle`, `customImageUri` and/or `description` properties for the video.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any limitation for the image ?
I see the internal tvOS api need a png, but not clear if a png is mandatory in the API

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the API supports the image formats supported by UIImage, which contains the classic ones like jpeg, png.
The list can be found here:

https://developer.apple.com/library/archive/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/LoadingImages/LoadingImages.html

@freeboub
Copy link
Collaborator

freeboub commented Oct 7, 2023

notice also that you have linter error ...
Run yarn lint
yarn run v1.22.19
$ yarn eslint .
$ /home/runner/work/react-native-video/react-native-video/node_modules/.bin/eslint .

/home/runner/work/react-native-video/react-native-video/src/Video.tsx
Error: 485:11 error Do not use "@ts-ignore" because it alters compilation errors @typescript-eslint/ban-ts-comment

✖ 1 problem (1 error, 0 warnings)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.

You can keep the sample as is. @KrzysztofMoch said you will have a look to the sample !
Thank you

@Duell10111
Copy link
Contributor Author

notice also that you have linter error ...

Run yarn lint

yarn run v1.22.19

$ yarn eslint .

$ /home/runner/work/react-native-video/react-native-video/node_modules/.bin/eslint .

/home/runner/work/react-native-video/react-native-video/src/Video.tsx

Error: 485:11 error Do not use "@ts-ignore" because it alters compilation errors @typescript-eslint/ban-ts-comment

✖ 1 problem (1 error, 0 warnings)

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Error: Process completed with exit code 1.

You can keep the sample as is. @KrzysztofMoch said you will have a look to the sample !

Thank you

I only added this line as the selectedtexttracks contained a type issue, blocking the typescript compile operation.
I can remove this line, once I am home again. 😊

@KrzysztofMoch
Copy link
Member

@Duell10111 There is fix on master for this ts error and for eslint errors, you can make rebase 😁

src/Video.tsx Outdated Show resolved Hide resolved
@freeboub
Copy link
Collaborator

freeboub commented Oct 7, 2023

I was able to fix it :) So let's merge !
(And thank you for image detailed informations !)
Thank you !

@freeboub freeboub merged commit a855284 into TheWidlarzGroup:master Oct 7, 2023
1 check passed
@Duell10111 Duell10111 deleted the custom-image-metadata branch November 6, 2023 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants