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
06bdf838
Commit
06bdf838
authored
Feb 20, 2020
by
liupengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正式
parent
501285e7
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
10 deletions
+22
-10
advideo2.css
egret/advideo2.css
+0
-1
output.js
egret/bin-release/output.js
+2
-2
output_develop.js
egret/bin-release/output_develop.js
+1
-1
index.html
egret/index.html
+1
-1
adVideo.ts
egret/src/adVideo/adVideo.ts
+6
-0
defaultVideoConfig.ts
egret/src/adVideo/video-core/defaultVideoConfig.ts
+1
-1
event.ts
egret/src/adVideo/video-core/event.ts
+5
-0
videoCtrl.ts
egret/src/myVideo/videoCtrl.ts
+6
-4
No files found.
egret/advideo.css
→
egret/advideo
2
.css
View file @
06bdf838
...
@@ -100,7 +100,6 @@
...
@@ -100,7 +100,6 @@
/* fenge */
/* fenge */
.video-loading
{
.video-loading
{
/* background: url('//yun.dui88.com/advideo2020viewfile.gif') no-repeat; */
background-size
:
contain
;
background-size
:
contain
;
background-color
:
black
;
background-color
:
black
;
width
:
100%
;
width
:
100%
;
...
...
egret/bin-release/output.js
View file @
06bdf838
This diff is collapsed.
Click to expand it.
egret/bin-release/output_develop.js
View file @
06bdf838
This diff is collapsed.
Click to expand it.
egret/index.html
View file @
06bdf838
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./advideo.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./advideo
2
.css"
/>
<style>
<style>
html
,
html
,
body
{
body
{
...
...
egret/src/adVideo/adVideo.ts
View file @
06bdf838
...
@@ -34,6 +34,7 @@ class MyAdvideo {
...
@@ -34,6 +34,7 @@ class MyAdvideo {
appContent
:
appContent
;
appContent
:
appContent
;
isPlayEnd
:
boolean
;
isPlayEnd
:
boolean
;
isPlaying
:
boolean
;
isPlaying
:
boolean
;
playSuccessCloseCb
:
any
;
constructor
(
config
)
{
constructor
(
config
)
{
this
.
el
=
config
.
el
;
this
.
el
=
config
.
el
;
this
.
_times
=
{
this
.
_times
=
{
...
@@ -135,6 +136,10 @@ class MyAdvideo {
...
@@ -135,6 +136,10 @@ class MyAdvideo {
this
.
isPlaying
=
false
;
this
.
isPlaying
=
false
;
this
.
stragegyFn
[
this
.
strategy
].
report
.
videoClose
(
this
.
videoRaw
,
this
.
_times
);
this
.
stragegyFn
[
this
.
strategy
].
report
.
videoClose
(
this
.
videoRaw
,
this
.
_times
);
this
.
isVideoIng
=
false
;
this
.
isVideoIng
=
false
;
this
.
isPlayEnd
=
false
;
if
(
this
.
playSuccessCloseCb
)
{
this
.
playSuccessCloseCb
();
}
this
.
hide
();
this
.
hide
();
});
});
}
}
...
@@ -144,6 +149,7 @@ class MyAdvideo {
...
@@ -144,6 +149,7 @@ class MyAdvideo {
if
(
this
.
isVideoIng
)
{
if
(
this
.
isVideoIng
)
{
return
;
return
;
}
}
this
.
reset
();
this
.
isVideoIng
=
true
;
this
.
isVideoIng
=
true
;
this
.
strategy
=
'dianxing'
;
this
.
strategy
=
'dianxing'
;
const
res
=
await
this
.
stragegyFn
[
this
.
strategy
].
getVideo
(
type
);
const
res
=
await
this
.
stragegyFn
[
this
.
strategy
].
getVideo
(
type
);
...
...
egret/src/adVideo/video-core/defaultVideoConfig.ts
View file @
06bdf838
...
@@ -3,7 +3,7 @@ export default {
...
@@ -3,7 +3,7 @@ export default {
controls
:
false
,
controls
:
false
,
playsInline
:
true
,
playsInline
:
true
,
preload
:
'auto'
,
preload
:
'auto'
,
poster
:
'//yun.dui88.com/
h5-mani/makeMoney/video/
viewfile.gif'
,
poster
:
'//yun.dui88.com/
advideo2020
viewfile.gif'
,
'x5-video-player-fullscreen'
:
true
,
'x5-video-player-fullscreen'
:
true
,
'x5-video-orientation'
:
'landscape|portrait'
,
'x5-video-orientation'
:
'landscape|portrait'
,
'x5-video-player-type'
:
'h5'
,
'x5-video-player-type'
:
'h5'
,
...
...
egret/src/adVideo/video-core/event.ts
View file @
06bdf838
...
@@ -40,6 +40,11 @@ class EventEmitter {
...
@@ -40,6 +40,11 @@ class EventEmitter {
removeAll
()
{
removeAll
()
{
this
.
_events
=
{};
this
.
_events
=
{};
}
}
removeEvent
(
event
)
{
if
(
this
.
_events
[
event
])
{
this
.
_events
[
event
]
=
[];
}
}
}
}
export
default
EventEmitter
;
export
default
EventEmitter
;
egret/src/myVideo/videoCtrl.ts
View file @
06bdf838
...
@@ -10,6 +10,7 @@ let videoContanier = document.querySelector('#video-contanier');
...
@@ -10,6 +10,7 @@ let videoContanier = document.querySelector('#video-contanier');
// 消消乐的监听
// 消消乐的监听
window
[
'playingVideoClose'
]
=
()
=>
{
window
[
'playingVideoClose'
]
=
()
=>
{
if
(
videoIns
&&
videoIns
.
isPlaying
)
{
if
(
videoIns
&&
videoIns
.
isPlaying
)
{
console
.
log
(
'正在播放中'
);
videoIns
.
isPlaying
=
false
;
videoIns
.
isPlaying
=
false
;
videoIns
.
hide
();
videoIns
.
hide
();
videoIns
.
player
.
$video
.
src
=
''
;
videoIns
.
player
.
$video
.
src
=
''
;
...
@@ -18,6 +19,7 @@ window['playingVideoClose'] = () => {
...
@@ -18,6 +19,7 @@ window['playingVideoClose'] = () => {
return
'0'
;
return
'0'
;
}
}
if
(
videoIns
&&
videoIns
.
isPlayEnd
)
{
if
(
videoIns
&&
videoIns
.
isPlayEnd
)
{
console
.
log
(
'播放完成'
);
videoIns
.
player
.
emit
(
'$videoClose'
);
videoIns
.
player
.
emit
(
'$videoClose'
);
playBg
();
playBg
();
return
'0'
return
'0'
...
@@ -43,10 +45,10 @@ export const handleVideo = (
...
@@ -43,10 +45,10 @@ export const handleVideo = (
videoIns
.
play
().
then
(()
=>
{
videoIns
.
play
().
then
(()
=>
{
// completeCallback();
// completeCallback();
})
})
videoIns
.
play
er
.
event
.
once
(
'$videoClose'
,
()
=>
{
videoIns
.
play
SuccessCloseCb
=
()
=>
{
returnCallback
(
true
);
console
.
log
(
'呗调用'
);
playBg
(
);
returnCallback
(
true
);
}
)
}
}
else
{
}
else
{
showToast
(
"广告准备中,请稍后再试"
);
showToast
(
"广告准备中,请稍后再试"
);
}
}
...
...
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