Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaoleTuia
Project
Project
Details
Activity
Releases
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
王剑峰
xiaoxiaoleTuia
Commits
9c9474bf
Commit
9c9474bf
authored
Feb 18, 2020
by
liupengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去测试
parent
34c03ee8
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
7 deletions
+24
-7
output.js
egret/bin-release/output.js
+3
-1
output_develop.js
egret/bin-release/output_develop.js
+1
-1
egretProperties.json
egret/egretProperties.json
+2
-2
adVideo.ts
egret/src/adVideo/adVideo.ts
+7
-3
videoCtrl.ts
egret/src/myVideo/videoCtrl.ts
+11
-0
No files found.
egret/bin-release/output.js
View file @
9c9474bf
This diff is collapsed.
Click to expand it.
egret/bin-release/output_develop.js
View file @
9c9474bf
This diff is collapsed.
Click to expand it.
egret/egretProperties.json
View file @
9c9474bf
{
"engineVersion"
:
"5.2.
7
"
,
"compilerVersion"
:
"5.2.
7
"
,
"engineVersion"
:
"5.2.
33
"
,
"compilerVersion"
:
"5.2.
33
"
,
"template"
:
{},
"target"
:
{
"current"
:
"web"
...
...
egret/src/adVideo/adVideo.ts
View file @
9c9474bf
...
...
@@ -17,7 +17,6 @@ interface appContent {
type
:
number
,
appIcon
:
string
}
class
MyAdvideo
{
el
:
any
;
player
:
AdVideo
;
...
...
@@ -34,6 +33,7 @@ class MyAdvideo {
stragegyFn
:
any
;
appContent
:
appContent
;
isPlayEnd
:
boolean
;
isPlaying
:
boolean
;
constructor
(
config
)
{
this
.
el
=
config
.
el
;
this
.
_times
=
{
...
...
@@ -80,6 +80,7 @@ class MyAdvideo {
// 请求完成
initListener
()
{
// 页面不可见
document
.
addEventListener
(
'visibilitychange'
,
()
=>
{
// 用户离开了当前页面
if
(
document
.
visibilityState
===
'hidden'
)
{
...
...
@@ -91,10 +92,11 @@ class MyAdvideo {
}
});
this
.
player
.
on
(
'play'
,
()
=>
{
this
.
_times
.
_readyTime
=
+
new
Date
();
this
.
_times
.
duration
=
this
.
player
.
$video
.
duration
this
.
stragegyFn
[
this
.
strategy
].
report
.
videoLoad
(
this
.
videoRaw
,
this
.
_times
);
if
(
this
.
player
.
$video
.
currentTime
===
0
)
{
this
.
isPlaying
=
true
;
this
.
_times
.
_readyTime
=
+
new
Date
();
this
.
stragegyFn
[
this
.
strategy
].
report
.
videoLoad
(
this
.
videoRaw
,
this
.
_times
);
this
.
_times
.
_showTime
=
+
new
Date
();
this
.
stragegyFn
[
this
.
strategy
].
report
.
videoPlayStart
(
this
.
videoRaw
,
this
.
_times
);
}
...
...
@@ -124,11 +126,13 @@ class MyAdvideo {
}
});
this
.
player
.
on
(
'ended'
,
()
=>
{
this
.
isPlaying
=
false
;
this
.
stragegyFn
[
this
.
strategy
].
report
.
videoPlayEnd
(
this
.
videoRaw
,
this
.
_times
);
this
.
isPlayEnd
=
true
;
this
.
playResolve
();
});
this
.
player
.
on
(
'$videoClose'
,
()
=>
{
this
.
isPlaying
=
false
;
this
.
stragegyFn
[
this
.
strategy
].
report
.
videoClose
(
this
.
videoRaw
,
this
.
_times
);
this
.
isVideoIng
=
false
;
this
.
hide
();
...
...
egret/src/myVideo/videoCtrl.ts
View file @
9c9474bf
...
...
@@ -7,6 +7,17 @@ import MyAdvideo from "../adVideo/adVideo";
import
{
stopBg
,
playBg
}
from
"../soundCtrl"
;
let
videoIns
:
MyAdvideo
;
let
videoContanier
=
document
.
querySelector
(
'#video-contanier'
);
window
[
'playingVideoClose'
]
=
()
=>
{
if
(
videoIns
&&
videoIns
.
isPlaying
)
{
videoIns
.
isPlaying
=
false
;
videoIns
.
hide
();
videoIns
.
player
.
$video
.
src
=
''
;
videoIns
.
isVideoIng
=
false
;
playBg
();
return
'0'
;
}
return
'1'
;
}
export
const
handleVideo
=
(
returnCallback
:
(
s
:
boolean
)
=>
void
,
completeCallback
:
Function
,
...
...
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