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

fix(weapp): LivePlayer attribute replenishment #14668

Merged
merged 2 commits into from
Oct 30, 2023
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
10 changes: 6 additions & 4 deletions packages/taro-components/types/LivePlayer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ interface LivePlayerProps extends StandardProps {
*/
pictureInPictureMode?: ('push' | 'pop')[] | 'push' | 'pop' | ''
/** 当跳转到其它微信原生页面时,是否自动暂停本页面的实时音视频播放
* @default true
* @supported weapp, qq
*/
autoPauseIfOpenNative?: string
/** 格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;
autoPauseIfOpenNative?: boolean
/** 格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html ,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;
* @default 'no-referrer'
* @supported weapp
*/
referrerPolicy?: 'origin' | 'no-referrer'
Expand Down Expand Up @@ -125,11 +127,11 @@ interface LivePlayerProps extends StandardProps {
/** 用户选择投屏设备时触发 detail = { state: "success"/"fail" }
* @supported weapp
*/
onCastingUserSelect?: CommonEventFunction
onCastingUserSelect?: CommonEventFunction<{ state: 'success' | 'fail' }>
/** 投屏成功/失败时触发 detail = { type, state: "success"/"fail" }
* @supported weapp
*/
onCastingStateChange?: CommonEventFunction
onCastingStateChange?: CommonEventFunction<{ type: any, state: 'success' | 'fail' }>
/** 投屏被中断时触发
* @supported weapp
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down Expand Up @@ -2009,12 +2015,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down Expand Up @@ -3699,12 +3711,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down Expand Up @@ -1869,12 +1875,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down Expand Up @@ -3241,12 +3247,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down Expand Up @@ -6209,12 +6221,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down Expand Up @@ -2537,12 +2543,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,18 @@ require("./taro");
"auto-pause-if-navigate": _true,
"auto-pause-if-open-native": _true,
"picture-in-picture-mode": "[]",
"enable-auto-rotation": _false,
"referrer-policy": "'no-referrer'",
"enable-casting": _false,
bindstatechange: _empty,
bindfullscreenchange: _empty,
bindnetstatus: _empty,
bindAudioVolumeNotify: _empty,
bindEnterPictureInPicture: _empty,
bindLeavePictureInPicture: _empty
bindLeavePictureInPicture: _empty,
bindCastingUserSelect: _empty,
bindCastingStateChange: _empty,
bindCastingInterrupt: _empty
},
Video: {
title: _empty,
Expand Down
Loading