0
jwplayer를 사용하여 동영상을 재생하기 전에 일부 동적 광고를 재생해야합니다.jwplayer를 사용하여 동영상을 재생하기 전에 광고를 재생하는 방법
나는 여기에 $ 고해상도 변수는 내 광고 비디오 파일의 XML 형식을 포함
$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
});
비디오를 재생하는 코드와 광고를 다음했다. 하지만 재생 전용 동영상은 재생하지 않습니다. 이 문제를 어떻게 해결할 수 있습니까?
광고 URL에 직접 URL을 제공 할 수 있습니까? - https://s3.amazonaws.com/demo.jwplayer.com/static-tag/jwplayer-30s.mp4. – soniya