php
  • jquery
  • jwplayer
  • 2016-05-31 1 views 0 likes 
    0

    jwplayerを使用して動画を再生する前に、動的広告を再生する必要があります。jwplayerを使って動画を再生する前に広告を再生する方法

    私はここでビデオや広告

    $res = '<?xml version="1.0" encoding="UTF-8"?>'; 
    $res .= '<VAST version="2.0">'; 
    $res .= '<Ad id="static">'; 
    $res .= '<InLine>'; 
    $res .= '<AdSystem>Static VAST Template</AdSystem>'; 
    $res .= '<AdTitle>Static VAST Tag</AdTitle>'; 
    $res .='<Impression>http://example.com/pixel.gif</Impression>'; 
    $res .= '<Creatives>'; 
    $res .= '<Creative>'; 
    $res .= '<Linear>'; 
    $res .= '<Duration>00:00:08</Duration>'; 
    $res .= '<TrackingEvents>'; 
           $res .='<Tracking event="start">http://example.com/pixel.gif</Tracking>'; 
           $res .='<Tracking event="firstQuartile">http://example.com/pixel.gif</Tracking>'; 
           $res .='<Tracking event="midpoint">http://example.com/pixel.gif</Tracking>'; 
           $res .='<Tracking event="thirdQuartile">http://example.com/pixel.gif</Tracking>'; 
           $res .='<Tracking event="complete">http://example.com/pixel.gif</Tracking>'; 
           $res .='<Tracking event="pause">http://example.com/pixel.gif</Tracking>'; 
           $res .='<Tracking event="mute">http://example.com/pixel.gif</Tracking>'; 
           $res .='<Tracking event="fullscreen">http://example.com/pixel.gif</Tracking>'; 
           $res .='</TrackingEvents>'; 
          $res .='<VideoClicks>'; 
           $res .='<ClickThrough>http://www.longtailvideo.com/</ClickThrough>'; 
           $res .='<ClickTracking>http://example.com/pixel.gif</ClickTracking>'; 
          $res .='</VideoClicks>'; 
          $res .='<MediaFiles>'; 
           $res .='<MediaFile type="video/mp4" bitrate="300" width="480" height="270">'; 
           $res .='http://example.com/uploads/myPReroll.mp4'; 
           $res .='</MediaFile>'; 
          $res .='</MediaFiles>'; 
          $res .='</Linear>'; 
         $res .='</Creative>'; 
         $res .='</Creatives>'; 
        $res .='</InLine>'; 
        $res .='</Ad>'; 
    $res .='</VAST>'; 
    
    jwplayer('primcast.com').setup({ 
        file: 'http://localhost.com/test/uploads/videos/test-video-107.mp4', 
        primary: 'flash', 
        advertising: { 
        client: 'vast', 
        tag: '<?php // echo $res ;?>' 
        }, 
        width: 480, 
        height: 270 
    }); 
    

    を再生するためのコードを、以下の$ RESている変数は、広告ビデオファイルのxml形式が含まれています。 しかし、その再生のみのビデオではなく、広告を再生します。どうしたらいいですか?

    答えて

    0

    JW Playerでこのコードは必要ありません。あなたがする必要があるすべては広告でVAST広告タグのURLを含めることで、あなたは私達のプレーヤーの広告のライセンスを持っていると仮定すると:{}ブロックのタグ:「」パラメータ:

    jwplayer('your_div_id').setup({ 
        file: 'your_video_URL', 
        advertising: { 
         client: 'vast', 
         tag: 'your_VAST_URL' 
        } 
    }); 
    

    あなたはまた、広告タグを含めることができますJW Playerのアカウントダッシュボードを使用してプレーヤーの設定で直接操作します。

    詳細については、http://support.jwplayer.com/customer/portal/articles/1431665-basic-preroll-video-adsを参照してください。

    +0

    私は直接URLを与えることができます: - https://s3.amazonaws.com/demo.jwplayer.com/static-tag/jwplayer-30s.mp4広告タグで。 – soniya

    関連する問題