Commit ada264be authored by 李维's avatar 李维

修改全屏视频控制条样式

parent b2668152
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
@property(cc.Node)
btn_play: cc.Node = null;
@property(cc.Node)
btn_pause: cc.Node = null;
@property(cc.Node)
btn_fullscreen: cc.Node = null;
@property(cc.Node)
btn_exit_fullscreen: cc.Node = null;
@property(cc.Node)
label_title: cc.Node = null;
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start () {
this.node.off("inFullscreen")
this.node.on("inFullscreen", (opt)=>{
const {isPlaying, title} = opt;
this.label_title.getComponent(cc.Label).string = title ? title : ""
this.btn_play.active = !isPlaying;
this.btn_pause.active = isPlaying;
})
}
onPlayClick() {
this.node.emit("play")
this.btn_play.active = false;
this.btn_pause.active = true;
}
onPauseClick() {
this.node.emit("pause")
this.btn_pause.active = false;
this.btn_play.active = true;
}
onFuscreenClick() {
this.node.emit("play")
}
onExitFullscreenClick() {
this.node.emit("exit_fullscreen")
}
// update (dt) {}
}
{
"ver": "1.0.8",
"uuid": "b725d708-485d-4459-a7ed-d8face0b0bd1",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "5739dde5-5c3b-4e67-b222-a1599fcc50dc",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "caa17dc6-1365-483f-b5b1-5883a81a009e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 64,
"height": 64,
"platformSettings": {},
"subMetas": {
"icon_player_back": {
"ver": "1.0.4",
"uuid": "e5fe1c4e-5b32-4284-887c-dec10747ae62",
"rawTextureUuid": "caa17dc6-1365-483f-b5b1-5883a81a009e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 16,
"trimY": 4,
"width": 32,
"height": 56,
"rawWidth": 64,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "7658704f-e996-42ba-ad26-36d436d79621",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 64,
"height": 64,
"platformSettings": {},
"subMetas": {
"icon_player_exit_fullscreen": {
"ver": "1.0.4",
"uuid": "ece9ff2a-0eed-41cc-acc9-a6253b0dec64",
"rawTextureUuid": "7658704f-e996-42ba-ad26-36d436d79621",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0.5,
"trimX": 4,
"trimY": 3,
"width": 56,
"height": 57,
"rawWidth": 64,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "45045521-10c9-4247-8558-019916081ae0",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 64,
"height": 64,
"platformSettings": {},
"subMetas": {
"icon_player_fullscreen": {
"ver": "1.0.4",
"uuid": "356d3e94-9857-4a44-9637-4f06f778c7a4",
"rawTextureUuid": "45045521-10c9-4247-8558-019916081ae0",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"trimX": 3,
"trimY": 3,
"width": 57,
"height": 57,
"rawWidth": 64,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "ab6902c7-0e1a-455a-8d18-c7c8e2494191",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 64,
"height": 64,
"platformSettings": {},
"subMetas": {
"icon_player_pause": {
"ver": "1.0.4",
"uuid": "1a63f689-d1cf-49cc-965d-9672f0f2c067",
"rawTextureUuid": "ab6902c7-0e1a-455a-8d18-c7c8e2494191",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0.5,
"trimX": 13,
"trimY": 3,
"width": 38,
"height": 57,
"rawWidth": 64,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "b4414377-4e07-4f5f-a511-73fe2519ce82",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 64,
"height": 64,
"platformSettings": {},
"subMetas": {
"icon_player_play": {
"ver": "1.0.4",
"uuid": "9e7fde01-7bf3-4d59-9d97-dd7c97cade8a",
"rawTextureUuid": "b4414377-4e07-4f5f-a511-73fe2519ce82",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"trimX": 3,
"trimY": 3,
"width": 57,
"height": 57,
"rawWidth": 64,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment