Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/funny-baths-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"react-native-youtube-bridge": patch
"@react-native-youtube-bridge/core": patch
---

chore(docs): replace @remark with @remarks per TSDoc spec

- TSDoc specifies the tag name as `@remarks` (not `@remark`).
- This aligns our comments with the spec and improves tooling support.
- No runtime behavior changes.
- Ref: https://tsdoc.org/pages/tags/remarks/
10 changes: 5 additions & 5 deletions packages/core/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ export type PlayerEvents = {
export type YoutubePlayerVars = {
/**
* This parameter specifies whether the initial video will automatically start to play when the player loads.
* @remark
* @remarks
* - If the `muted` is not set to true when activating the `autoplay`,
* - it may not work properly depending on browser policy. (https://developer.chrome.com/blog/autoplay)
*/
autoplay?: boolean;
/**
* This parameter indicates whether the video player controls are displayed.
* @remark
* @remarks
* - `controls: false` - Player controls do not display in the player.
* - `controls: true` (default) - Player controls display in the player.
* @defaultValue true
Expand All @@ -152,22 +152,22 @@ export type YoutubePlayerVars = {
/**
* This parameter controls whether videos play inline or fullscreen on iOS.
*
* @remark
* @remarks
* Valid values are:
* - `playsinline: false` - Results in fullscreen playback. This is currently the default value, though the default is subject to change.
* - `playsinline: true` - Results in inline playback for mobile browsers and for WebViews created with the `allowsInlineMediaPlayback` property set to `YES`.
*/
playsinline?: boolean;
/**
* Prior to the change, this parameter indicates whether the player should show related videos when playback of the initial video ends.
* @remark
* @remarks
* After the change, you will not be able to disable related videos. Instead, if the `rel` parameter is set to `false, related videos will come from the same channel as the video that was just played.
*/
rel?: boolean;
Comment on lines +163 to 166
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix backtick typo in “rel” documentation

There’s an unclosed inline code fence around false, which can break formatting in generated docs.

Apply this patch:

- * After the change, you will not be able to disable related videos. Instead, if the `rel` parameter is set to `false, related videos will come from the same channel as the video that was just played.
+ * After the change, you will not be able to disable related videos. Instead, if the `rel` parameter is set to `false`, related videos will come from the same channel as the video that was just played.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* @remarks
* After the change, you will not be able to disable related videos. Instead, if the `rel` parameter is set to `false, related videos will come from the same channel as the video that was just played.
*/
rel?: boolean;
* @remarks
* After the change, you will not be able to disable related videos. Instead, if the `rel` parameter is set to `false`, related videos will come from the same channel as the video that was just played.
*/
rel?: boolean;
🤖 Prompt for AI Agents
In packages/core/src/types/index.ts around lines 163 to 166, the JSDoc for `rel`
contains an unclosed inline code fence around false which breaks formatting in
generated docs; fix it by wrapping false in backticks (`false`) so the sentence
reads "...if the `rel` parameter is set to `false`, related videos..." and
ensure punctuation spacing remains correct.

/**
* This parameter provides an extra security measure for the IFrame API and is only supported for IFrame embeds.
*
* @remark
* @remarks
* - When `useInlineHtml` is `true` (iOS/Android inline WebView), if not provided, the library defaults this to `https://localhost` and sets the WebView `baseUrl` accordingly so that the document origin and this value match.
* - When `useInlineHtml` is `false` (remote WebView), if not provided, the external page URL defaults to `https://react-native-youtube-bridge.pages.dev` and this value follows that URL. If you pass a custom `webViewUrl` (base URL), `origin` should follow that same origin.
* - In all cases, this value MUST exactly match the document's origin that hosts the iframe for the YouTube IFrame API to function correctly.
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-youtube-bridge/src/types/youtube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export type YoutubeViewProps = {
iframeStyle?: CSSProperties;
/**
* If set to true, the player will use inline HTML.
* @remark
* @remarks
* When false, the player will use a webview with the default URI (https://react-native-youtube-bridge.pages.dev).
* To use a custom webview, set `webViewUrl` to your own URL.
* @defaultValue true
Expand All @@ -52,7 +52,7 @@ export type YoutubeViewProps = {
useInlineHtml?: boolean;
/**
* The URL for the WebView source.
* @remark
* @remarks
* When `useInlineHtml` is `true`, this value is set as the `baseUrl` for HTML content.
* In this case, the origin of `webViewUrl` MUST exactly match the YouTube IFrame API `origin`.
* - Include the port when applicable (e.g. baseUrl `https://localhost:8081/` ⇄ origin `https://localhost:8081`).
Expand Down