Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
5e826c18
Commit
5e826c18
authored
Nov 28, 2019
by
sujie@126.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
9d47a89d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
onlineclassroomplay.js
src/pages/websiteindex/onlineclassroomplay.js
+22
-10
No files found.
src/pages/websiteindex/onlineclassroomplay.js
View file @
5e826c18
...
...
@@ -139,7 +139,7 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
this
.
videoContext
=
wx
.
createVideoContext
(
'video'
);
this
.
videoContext
Online
=
wx
.
createVideoContext
(
'video'
);
},
/**
...
...
@@ -156,6 +156,9 @@ Page({
if
(
this
.
videoContext
)
{
this
.
videoContext
.
stop
();
}
if
(
this
.
videoContextOnline
)
{
this
.
videoContextOnline
.
stop
();
}
this
.
innerAudioContext
.
pause
();
this
.
resetAudiosPlayStatus
()
clearInterval
(
this
.
data
.
voiceInterval
);
...
...
@@ -168,6 +171,9 @@ Page({
if
(
this
.
videoContext
)
{
this
.
videoContext
.
stop
();
}
if
(
this
.
videoContextOnline
)
{
this
.
videoContextOnline
.
stop
();
}
this
.
innerAudioContext
.
pause
();
this
.
setData
({
audioStorage
:
{
...
...
@@ -329,6 +335,9 @@ Page({
if
(
this
.
videoContext
)
{
this
.
videoContext
.
stop
();
}
if
(
this
.
videoContextOnline
)
{
this
.
videoContextOnline
.
stop
();
}
this
.
innerAudioContext
.
pause
();
this
.
setData
({
audioStorage
:
{
...
...
@@ -339,9 +348,9 @@ Page({
},
clickVideo
(){
if
(
this
.
data
.
videoStatus
.
isPlay
){
this
.
videoContext
.
pause
();
this
.
videoContext
Online
.
pause
();
}
else
{
this
.
videoContext
.
play
()
this
.
videoContext
Online
.
play
()
if
(
this
.
curAudioValue
){
let
audioStorage
=
this
.
data
.
audioStorage
;
audioStorage
[
this
.
curAudioValue
].
play
=
false
;
...
...
@@ -369,19 +378,19 @@ Page({
const
{
index
}
=
e
.
currentTarget
.
dataset
;
switch
(
index
)
{
case
0
:
this
.
videoContext
.
playbackRate
(
0.8
)
this
.
videoContext
Online
.
playbackRate
(
0.8
)
break
;
case
1
:
this
.
videoContext
.
playbackRate
(
1
)
this
.
videoContext
Online
.
playbackRate
(
1
)
break
;
case
2
:
this
.
videoContext
.
playbackRate
(
1.25
)
this
.
videoContext
Online
.
playbackRate
(
1.25
)
break
;
case
3
:
this
.
videoContext
.
playbackRate
(
1.5
)
this
.
videoContext
Online
.
playbackRate
(
1.5
)
break
;
case
4
:
this
.
videoContext
.
playbackRate
(
2
)
this
.
videoContext
Online
.
playbackRate
(
2
)
break
;
default
:
break
;
...
...
@@ -546,8 +555,8 @@ Page({
value
,
duration
}
=
e
.
currentTarget
.
dataset
;
if
(
this
.
videoContext
){
this
.
videoContext
.
stop
();
if
(
this
.
videoContext
Online
){
this
.
videoContext
Online
.
stop
();
}
this
.
innerAudioContext
.
src
=
audioorigin
(
value
);
this
.
curAudioValue
=
value
;
...
...
@@ -782,6 +791,9 @@ Page({
mode
}
=
e
.
currentTarget
.
dataset
;
this
.
innerAudioContext
.
pause
();
if
(
this
.
videoContextOnline
)
{
this
.
videoContextOnline
.
stop
();
}
this
.
setData
({
'videostatus.videoId'
:
src
,
'videostatus.videoShow'
:
true
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment