Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
24806908
U
uni-app
项目概览
DCloud
/
uni-app
3 个月 前同步成功
通知
725
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
24806908
编写于
4月 07, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
ef9f09db
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
51 addition
and
27 deletion
+51
-27
packages/uni-app-plus/dist/uni.runtime.esm.js
packages/uni-app-plus/dist/uni.runtime.esm.js
+25
-4
packages/uni-app-plus/src/service/api/context/getBackgroundAudioManager.ts
...plus/src/service/api/context/getBackgroundAudioManager.ts
+1
-1
packages/uni-mp-weixin/dist/uni.api.esm.js
packages/uni-mp-weixin/dist/uni.api.esm.js
+13
-13
packages/uni-mp-weixin/dist/uni.mp.esm.js
packages/uni-mp-weixin/dist/uni.mp.esm.js
+12
-9
未找到文件。
packages/uni-app-plus/dist/uni.runtime.esm.js
浏览文件 @
24806908
...
...
@@ -15003,7 +15003,7 @@ function createAudioInstance() {
audioId,
};
}
function setAudioState({ audioId, src, startTime, autoplay = false, loop = false, obeyMuteSwitch, volume, sessionCategory = AUDIO_DEFAULT_SESSION_CATEGORY, }) {
function setAudioState({ audioId, src, startTime, autoplay = false, loop = false, obeyMuteSwitch, volume, sessionCategory = AUDIO_DEFAULT_SESSION_CATEGORY,
playbackRate,
}) {
const audio = audios[audioId];
if (audio) {
const style = {
...
...
@@ -15011,7 +15011,10 @@ function setAudioState({ audioId, src, startTime, autoplay = false, loop = false
autoplay,
};
if (src) {
audio.src = style.src = getRealPath(src);
// iOS 设置 src 会重新播放
const realSrc = getRealPath(src);
if (audio.src !== realSrc)
audio.src = style.src = realSrc;
}
if (startTime) {
audio.startTime = style.startTime = startTime;
...
...
@@ -15023,6 +15026,10 @@ function setAudioState({ audioId, src, startTime, autoplay = false, loop = false
if (sessionCategory) {
audio.setSessionCategory(sessionCategory);
}
if (playbackRate && audio.playbackRate) {
// @ts-ignore
audio.playbackRate(playbackRate);
}
initStateChage(audioId);
}
return {
...
...
@@ -15128,6 +15135,10 @@ const props$1 = [
{
name: 'volume',
},
{
name: 'playbackRate',
cache: true,
},
];
class InnerAudioContext {
constructor(id) {
...
...
@@ -15378,7 +15389,7 @@ function getBackgroundAudioState() {
}
return data;
}
function setMusicState(args) {
function setMusicState(args
, name
) {
initMusic();
const props = [
'src',
...
...
@@ -15389,6 +15400,11 @@ function setMusicState(args) {
'epname',
'title',
];
if (name === 'playbackRate') {
let val = args[name];
audio.playbackRate && audio.playbackRate(parseFloat(val));
return;
}
const style = {};
Object.keys(args).forEach((key) => {
if (props.indexOf(key) >= 0) {
...
...
@@ -15501,6 +15517,11 @@ const props = [
readonly: true,
default: 'http',
},
{
name: 'playbackRate',
default: 1,
cache: true,
},
];
class BackgroundAudioManager {
constructor() {
...
...
@@ -15516,7 +15537,7 @@ class BackgroundAudioManager {
? undefined
: (value) => {
this._options[name] = value;
setMusicState(this._options);
setMusicState(this._options
, name
);
},
});
});
...
...
packages/uni-app-plus/src/service/api/context/getBackgroundAudioManager.ts
浏览文件 @
24806908
...
...
@@ -214,7 +214,7 @@ function setMusicState(args: Partial<Audio>, name?: string) {
'
title
'
,
]
if
(
name
&&
name
===
'
playbackRate
'
)
{
if
(
name
===
'
playbackRate
'
)
{
let
val
=
(
args
as
any
)[
name
]
audio
.
playbackRate
&&
audio
.
playbackRate
(
parseFloat
(
val
as
string
))
return
...
...
packages/uni-mp-weixin/dist/uni.api.esm.js
浏览文件 @
24806908
...
...
@@ -17,6 +17,10 @@ function invokeCreateVueAppHook(app) {
createVueAppHooks
.
forEach
((
hook
)
=>
hook
(
app
));
}
function
getBaseSystemInfo
()
{
return
wx
.
getSystemInfoSync
()
}
const
E
=
function
()
{
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
...
...
@@ -68,10 +72,6 @@ E.prototype = {
};
var
E$1
=
E
;
function
getBaseSystemInfo
()
{
return
wx
.
getSystemInfoSync
()
}
function
validateProtocolFail
(
name
,
msg
)
{
console
.
warn
(
`
${
name
}
:
${
msg
}
`
);
}
...
...
@@ -994,18 +994,18 @@ function createSelectorQuery() {
}
var
shims
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getProvider
:
getProvider
,
createSelectorQuery
:
createSelectorQuery
__proto__
:
null
,
getProvider
:
getProvider
,
createSelectorQuery
:
createSelectorQuery
});
var
protocols
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
redirectTo
:
redirectTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
,
showActionSheet
:
showActionSheet
__proto__
:
null
,
redirectTo
:
redirectTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
,
showActionSheet
:
showActionSheet
});
var
index
=
initUni
(
shims
,
protocols
);
...
...
packages/uni-mp-weixin/dist/uni.mp.esm.js
浏览文件 @
24806908
...
...
@@ -21,11 +21,13 @@ const ON_RESIZE = 'onResize';
const
ON_TAB_ITEM_TAP
=
'
onTabItemTap
'
;
const
ON_REACH_BOTTOM
=
'
onReachBottom
'
;
const
ON_PULL_DOWN_REFRESH
=
'
onPullDownRefresh
'
;
const
ON_ADD_TO_FAVORITES
=
'
onAddToFavorites
'
;
const
ON_ADD_TO_FAVORITES
=
'
onAddToFavorites
'
;
const
customizeRE
=
/:/g
;
function
customizeEvent
(
str
)
{
return
camelize
(
str
.
replace
(
customizeRE
,
'
-
'
));
}
function
hasLeadingSlash
(
str
)
{
return
str
.
indexOf
(
'
/
'
)
===
0
;
}
...
...
@@ -48,7 +50,7 @@ function once(fn, ctx = null) {
}
return
res
;
});
}
}
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -68,7 +70,8 @@ function stringifyQuery(obj, encodeStr = encode) {
.
join
(
'
&
'
)
:
null
;
return
res
?
`?
${
res
}
`
:
''
;
}
}
const
MINI_PROGRAM_PAGE_RUNTIME_HOOKS
=
/*#__PURE__*/
(()
=>
{
return
{
onPageScroll
:
1
,
...
...
@@ -859,12 +862,12 @@ function handleLink(event) {
}
var
parseOptions
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
});
const
createApp
=
initCreateApp
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录