Skip to content

Commit

Permalink
fix(weapp): LivePlayer attribute replenishment (#14668)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKonka authored Oct 30, 2023
1 parent f31b416 commit 75cefbb
Show file tree
Hide file tree
Showing 31 changed files with 378 additions and 58 deletions.
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

0 comments on commit 75cefbb

Please sign in to comment.