如何在jwplayer中更改标签“HD”

时间:2016-01-18 10:16:51

标签: jwplayer jwplayer6 jwplayer7

我在jwplayer下使用下面的脚本,它对我来说很好,但标签“HD”有问题,我想更改此标签,我该如何解决?

var playerInstance = jwplayer("containerForShortVideo");
                    playerInstance.setup({
                    image: "' .Main_VideoUrl(ImagesUrl($VideoDetails[0])) /*S3_VIDEO_BUCKETABSOLUTE_PATH . $VideoDetails[0]['ImageName']*/ . '",    
                    //primary: "flash",
                    autostart: false,
                    //bufferLength : 0,
                    sources: [{
                              file: "' . S3_VIDEO_BUCKETABSOLUTE_PATH . $highResolutionURL . '",
                              label: "720p HD",
                              type: "mp4"
                            },{
                              file: "' . S3_VIDEO_BUCKETABSOLUTE_PATH . $VideoDetails[0]['VideoStreamURL'] . '",
                              label: "480p SD",
                              type: "mp4"
                            },
                            {
                              file: "' . S3_VIDEO_BUCKETABSOLUTE_PATH . $lowResolutionURL . '",
                              label: "180p",
                              "default": "true",
                              type: "mp4"
                            }
                    ],
                    advertising: {
                    client: "vast",
                    schedule: {
                    adbreak1: {
                        offset: "pre",
                        tag: "'.$adurl1.'", 
                    },
                    adbreak2: {
                        offset:"'.$adurmidtime.'",
                        tag: "'.$adurl2.'",
                    },
                    adbreak3: {
                        offset: "post",
                        tag: "'.$adurl3.'",
                    },
                      }
                  }
                    });

这是图像 enter image description here

3 个答案:

答案 0 :(得分:0)

  • 按照此article
  • 中的说明操作
  • 特定图标的引用位于此article

    HD Off \ e60a

    HD On \ e609

答案 1 :(得分:0)

var playerInstance = jwplayer("containerForShortVideo");
                playerInstance.setup({
                image: "' .Main_VideoUrl(ImagesUrl($VideoDetails[0])) /*S3_VIDEO_BUCKETABSOLUTE_PATH . $VideoDetails[0]['ImageName']*/ . '",    
                //primary: "flash",
                autostart: false,
                //bufferLength : 0,
                sources: [{
                          file: "' . S3_VIDEO_BUCKETABSOLUTE_PATH . $highResolutionURL . '",
                          label: "720p Your Name",
                          type: "mp4"
                        },{
                          file: "' . S3_VIDEO_BUCKETABSOLUTE_PATH . $VideoDetails[0]['VideoStreamURL'] . '",
                          label: "480p SD",
                          type: "mp4"
                        },
                        {
                          file: "' . S3_VIDEO_BUCKETABSOLUTE_PATH . $lowResolutionURL . '",
                          label: "180p",
                          "default": "true",
                          type: "mp4"
                        }
                ],
                advertising: {
                client: "vast",
                schedule: {
                adbreak1: {
                    offset: "pre",
                    tag: "'.$adurl1.'", 
                },
                adbreak2: {
                    offset:"'.$adurmidtime.'",
                    tag: "'.$adurl2.'",
                },
                adbreak3: {
                    offset: "post",
                    tag: "'.$adurl3.'",
                },
                  }
              }
                });

只需更改标签即可。

答案 2 :(得分:0)

1。只是改变标签

  

用您自己的标签替换标签

var playerInstance = jwplayer("containerForShortVideo");
                        playerInstance.setup({
                        image: "' .Main_VideoUrl(ImagesUrl($VideoDetails[0])) /*S3_VIDEO_BUCKETABSOLUTE_PATH . $VideoDetails[0]['ImageName']*/ . '",    
                        //primary: "flash",
                        autostart: false,
                        //bufferLength : 0,
                        sources: [{
                                  file: "' . S3_VIDEO_BUCKETABSOLUTE_PATH . $highResolutionURL . '",
                                  label: "720p HD YOUR_LABLE", // change the label 
                                  type: "mp4"
                                },{
                                  file: "' . S3_VIDEO_BUCKETABSOLUTE_PATH . $VideoDetails[0]['VideoStreamURL'] . '",
                                  label: "480p SD YOUR_LABLE",
                                  type: "mp4"
                                },
                                {
                                  file: "' . S3_VIDEO_BUCKETABSOLUTE_PATH . $lowResolutionURL . '",
                                  label: "180p YOUR_LABLE",
                                  "default": "true",
                                  type: "mp4"
                                }
                        ],
                        advertising: {
                        client: "vast",
                        schedule: {
                        adbreak1: {
                            offset: "pre",
                            tag: "'.$adurl1.'", 
                        },
                        adbreak2: {
                            offset:"'.$adurmidtime.'",
                            tag: "'.$adurl2.'",
                        },
                        adbreak3: {
                            offset: "post",
                            tag: "'.$adurl3.'",
                        },
                          }
                      }
                        });

2。改变JWPLAYER皮肤

  

关注网址 - https://developer.jwplayer.com/jw-player/docs/developer-guide/customization/css-skinning/skins_creating/#introduction