Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ns_video_map
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
ns_video_map
Commits
1832cb60
Commit
1832cb60
authored
May 07, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 适配整屏
parent
7f8b9d0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
ns_video_map.fire
assets/ns_video_map/scene/ns_video_map.fire
+4
-4
ns_video_map.ts
assets/ns_video_map/scene/ns_video_map.ts
+11
-2
No files found.
assets/ns_video_map/scene/ns_video_map.fire
View file @
1832cb60
...
...
@@ -996,8 +996,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
4
60.4180000000001
,
2
91.003
,
4
74.06499999999994
,
2
71.898
,
0,
0,
0,
...
...
@@ -1065,8 +1065,8 @@
"_target": null,
"_alignFlags": 33,
"_left": 0,
"_right":
106.58199999999994
,
"_top":
33.497000000000014
,
"_right":
92.93500000000006
,
"_top":
52.601999999999975
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
assets/ns_video_map/scene/ns_video_map.ts
View file @
1832cb60
...
...
@@ -249,14 +249,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
const
canvas
=
cc
.
find
(
"
Canvas
"
);
video
.
node
.
on
(
'
ready-to-play
'
,
(
e
)
=>
{
video
.
node
.
on
(
'
ready-to-play
'
,
()
=>
{
console
.
log
(
'
e:
'
,
e
);
// console.log(' in ready-to-play')
// if (this.isDestroy) {
// return;
// }
video
.
node
.
width
=
e
.
width
;
video
.
node
.
height
=
e
.
height
;
const
sx
=
canvas
.
width
/
e
.
width
;
const
sy
=
canvas
.
height
/
e
.
height
;
video
.
node
.
scale
=
Math
.
min
(
sx
,
sy
);
video
.
play
();
this
.
refreshBtnState
();
window
[
"
air
"
].
hideAirClassLoading
();
...
...
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