Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sn03_playVideo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
sn03_playVideo
Commits
ea8e1810
Commit
ea8e1810
authored
Oct 27, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉返回主页按钮
parent
0ceed004
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
262 deletions
+36
-262
sn03_playVideo.fire
assets/sn03_playVideo/Scene/sn03_playVideo.fire
+35
-249
sn03_playVideo.ts
assets/sn03_playVideo/Scene/sn03_playVideo.ts
+1
-13
No files found.
assets/sn03_playVideo/Scene/sn03_playVideo.fire
View file @
ea8e1810
...
@@ -96,28 +96,25 @@
...
@@ -96,28 +96,25 @@
"__id__": 118
"__id__": 118
},
},
{
{
"__id__": 123
"__id__": 129
},
{
"__id__": 134
},
},
{
{
"__id__": 13
7
"__id__": 13
2
},
},
{
{
"__id__": 13
9
"__id__": 13
4
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
41
"__id__": 1
36
},
},
{
{
"__id__": 1
42
"__id__": 1
37
},
},
{
{
"__id__": 1
43
"__id__": 1
38
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5394,217 +5391,6 @@
...
@@ -5394,217 +5391,6 @@
"_N$verticalScrollBar": null,
"_N$verticalScrollBar": null,
"_id": "b1jDE78VRJBrNFzcwfIS7E"
"_id": "b1jDE78VRJBrNFzcwfIS7E"
},
},
{
"__type__": "cc.Node",
"_name": "btn_return",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 119
},
{
"__id__": 120
},
{
"__id__": 122
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 128,
"height": 130
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-846,
425,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "29Y0/rXCtNBLzQkNdgy+j4"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 118
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "b657058c-bcb3-456e-894f-6c8fa554dc16"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "77vY7WJ3dOE6TrMv+B3AMf"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 118
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 121
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 118
},
"_id": "3fGEyP6+lCsbQfSxz4x/Lb"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "55549iI3O9AioIDjTBmzlAF",
"handler": "exitGame",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 118
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 50,
"_right": 0,
"_top": 50,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "07o2anWnZAgo3xUHC8xrw2"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "pageButton",
"_name": "pageButton",
...
@@ -5614,10 +5400,10 @@
...
@@ -5614,10 +5400,10 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 1
24
"__id__": 1
19
},
},
{
{
"__id__": 12
9
"__id__": 12
4
}
}
],
],
"_active": true,
"_active": true,
...
@@ -5675,19 +5461,19 @@
...
@@ -5675,19 +5461,19 @@
"_name": "btn_last",
"_name": "btn_last",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
23
"__id__": 1
18
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 12
5
"__id__": 12
0
},
},
{
{
"__id__": 12
6
"__id__": 12
1
},
},
{
{
"__id__": 12
8
"__id__": 12
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5743,7 +5529,7 @@
...
@@ -5743,7 +5529,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
24
"__id__": 1
19
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -5775,7 +5561,7 @@
...
@@ -5775,7 +5561,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
24
"__id__": 1
19
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -5784,7 +5570,7 @@
...
@@ -5784,7 +5570,7 @@
"zoomScale": 1.2,
"zoomScale": 1.2,
"clickEvents": [
"clickEvents": [
{
{
"__id__": 12
7
"__id__": 12
2
}
}
],
],
"_N$interactable": true,
"_N$interactable": true,
...
@@ -5840,7 +5626,7 @@
...
@@ -5840,7 +5626,7 @@
"hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"_N$target": {
"__id__": 1
24
"__id__": 1
19
},
},
"_id": "63sqlR0bVEJrqaAhyT+FzF"
"_id": "63sqlR0bVEJrqaAhyT+FzF"
},
},
...
@@ -5859,7 +5645,7 @@
...
@@ -5859,7 +5645,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
24
"__id__": 1
19
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -5888,19 +5674,19 @@
...
@@ -5888,19 +5674,19 @@
"_name": "btn_next",
"_name": "btn_next",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
23
"__id__": 1
18
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
30
"__id__": 1
25
},
},
{
{
"__id__": 1
31
"__id__": 1
26
},
},
{
{
"__id__": 1
33
"__id__": 1
28
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5956,7 +5742,7 @@
...
@@ -5956,7 +5742,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 12
9
"__id__": 12
4
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -5988,7 +5774,7 @@
...
@@ -5988,7 +5774,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 12
9
"__id__": 12
4
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -5997,7 +5783,7 @@
...
@@ -5997,7 +5783,7 @@
"zoomScale": 1.2,
"zoomScale": 1.2,
"clickEvents": [
"clickEvents": [
{
{
"__id__": 1
32
"__id__": 1
27
}
}
],
],
"_N$interactable": true,
"_N$interactable": true,
...
@@ -6053,7 +5839,7 @@
...
@@ -6053,7 +5839,7 @@
"hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"_N$target": {
"__id__": 12
9
"__id__": 12
4
},
},
"_id": "3aZJp/FzlONJO+/okrPRip"
"_id": "3aZJp/FzlONJO+/okrPRip"
},
},
...
@@ -6072,7 +5858,7 @@
...
@@ -6072,7 +5858,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 12
9
"__id__": 12
4
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -6107,10 +5893,10 @@
...
@@ -6107,10 +5893,10 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 13
5
"__id__": 13
0
},
},
{
{
"__id__": 13
6
"__id__": 13
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -6166,7 +5952,7 @@
...
@@ -6166,7 +5952,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
34
"__id__": 1
29
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6199,7 +5985,7 @@
...
@@ -6199,7 +5985,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
34
"__id__": 1
29
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -6232,7 +6018,7 @@
...
@@ -6232,7 +6018,7 @@
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 13
8
"__id__": 13
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -6288,7 +6074,7 @@
...
@@ -6288,7 +6074,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 13
7
"__id__": 13
2
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6326,7 +6112,7 @@
...
@@ -6326,7 +6112,7 @@
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 1
40
"__id__": 1
35
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -6382,7 +6168,7 @@
...
@@ -6382,7 +6168,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 13
9
"__id__": 13
4
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6499,7 +6285,7 @@
...
@@ -6499,7 +6285,7 @@
"__id__": 38
"__id__": 38
},
},
"loadingSprite": {
"loadingSprite": {
"__id__": 13
9
"__id__": 13
4
},
},
"noPlayCover": {
"noPlayCover": {
"__id__": 32
"__id__": 32
...
...
assets/sn03_playVideo/Scene/sn03_playVideo.ts
View file @
ea8e1810
...
@@ -419,7 +419,7 @@ export default class VideoPlayerComponent extends cc.Component {
...
@@ -419,7 +419,7 @@ export default class VideoPlayerComponent extends cc.Component {
}
}
start
()
{
start
()
{
this
.
node
.
zIndex
=
10000
;
//
this.node.zIndex = 10000;
let
getData
=
this
.
getData
.
bind
(
this
);
let
getData
=
this
.
getData
.
bind
(
this
);
if
(
window
&&
window
[
"
courseware
"
])
{
if
(
window
&&
window
[
"
courseware
"
])
{
getData
=
window
[
"
courseware
"
].
getData
;
getData
=
window
[
"
courseware
"
].
getData
;
...
@@ -578,7 +578,6 @@ export default class VideoPlayerComponent extends cc.Component {
...
@@ -578,7 +578,6 @@ export default class VideoPlayerComponent extends cc.Component {
this
.
videoPlayer
.
stayOnBottom
=
true
;
this
.
videoPlayer
.
stayOnBottom
=
true
;
cc
.
find
(
`Canvas/Controls/fullscreen`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
`Canvas/Controls/fullscreen`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
`Canvas/Controls/exitfull`
).
active
=
this
.
isVideoFull
;
cc
.
find
(
`Canvas/Controls/exitfull`
).
active
=
this
.
isVideoFull
;
cc
.
find
(
`Canvas/btn_return`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
`Canvas/title`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
`Canvas/title`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
'
Canvas/pageButton
'
).
active
=
false
;
cc
.
find
(
'
Canvas/pageButton
'
).
active
=
false
;
const
videoContainer
=
cc
.
find
(
'
Canvas/video_node
'
);
const
videoContainer
=
cc
.
find
(
'
Canvas/video_node
'
);
...
@@ -629,7 +628,6 @@ export default class VideoPlayerComponent extends cc.Component {
...
@@ -629,7 +628,6 @@ export default class VideoPlayerComponent extends cc.Component {
this
.
videoPlayer
.
stayOnBottom
=
false
;
this
.
videoPlayer
.
stayOnBottom
=
false
;
cc
.
find
(
`Canvas/Controls/fullscreen`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
`Canvas/Controls/fullscreen`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
`Canvas/Controls/exitfull`
).
active
=
this
.
isVideoFull
;
cc
.
find
(
`Canvas/Controls/exitfull`
).
active
=
this
.
isVideoFull
;
cc
.
find
(
`Canvas/btn_return`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
`Canvas/title`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
`Canvas/title`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
'
Canvas/pageButton
'
).
active
=
true
;
cc
.
find
(
'
Canvas/pageButton
'
).
active
=
true
;
...
@@ -669,16 +667,6 @@ export default class VideoPlayerComponent extends cc.Component {
...
@@ -669,16 +667,6 @@ export default class VideoPlayerComponent extends cc.Component {
}
}
}
}
exitGame
()
{
this
.
data
.
templateName
=
"
JJ_Video_01
"
;
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
)?.
getComponent
(
'
middleLayer
'
);
if
(
middleLayer
)
{
middleLayer
.
exitGame
(
this
.
data
,
true
);
}
else
{
console
.
log
(
"
==触发返回事件==
"
);
}
}
update
(
dt
:
number
)
{
update
(
dt
:
number
)
{
if
(
!
this
.
_isReadyToPlay
)
{
if
(
!
this
.
_isReadyToPlay
)
{
return
;
return
;
...
...
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