Skip to content

Commit

Permalink
feat(VAST-39): Deploy demo on Github Pages (#27)
Browse files Browse the repository at this point in the history
* VAST-39 rename public folder to docs

---------

Co-authored-by: kasty <mariegosse@gmail.com>
  • Loading branch information
privaloops and kasty committed May 3, 2023
1 parent 24bad42 commit bb63625
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 2 deletions.
75 changes: 75 additions & 0 deletions docs/demo.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions docs/demo.js.map

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions docs/fixtures/vmap-inline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<vmap:VMAP version="1.0" xmlns:vmap="http://www.iab.net/videosuite/vmap" >
<vmap:AdBreak breakId="8661748b-b25a-4569-b03e-9dd33a43b28c" breakType="linear" timeOffset="start">
<vmap:AdSource allowMultipleAds="true" followRedirects="true" id="-1675117733">
<vmap:VASTAdData>
<VAST version="3.0" xmlns="http://www.iab.net/videosuite/vast">
<Ad id="8661748b-b25a-4569-b03e-9dd33a43b28c" sequence="1">
<Wrapper>
<AdSystem>SMART AdServer</AdSystem>
<VASTAdTagURI><![CDATA[https://www.arte.tv/static/artevpv7/vast/vast.xml]]></VASTAdTagURI>
<Error><![CDATA[https://example.com/error]]></Error>
<Impression><![CDATA[https://example.com/impression]]></Impression>
<Creatives/>
</Wrapper>
</Ad>
</VAST>
</vmap:VASTAdData>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak breakId="67d32666-1613-4a8d-b7f9-34a8064770b3" breakType="linear" timeOffset="50%">
<vmap:AdSource allowMultipleAds="true" followRedirects="true" id="907710148">
<vmap:VASTAdData>
<VAST version="3.0" xmlns="http://www.iab.net/videosuite/vast">
<Ad id="67d32666-1613-4a8d-b7f9-34a8064770b3" sequence="1">
<Wrapper>
<AdSystem>SMART AdServer</AdSystem>
<VASTAdTagURI><![CDATA[https://www.arte.tv/static/artevpv7/vast/vast.xml]]></VASTAdTagURI>
<Error><![CDATA[https://example.com/error]]></Error>
<Impression><![CDATA[https://example.com/impression]]></Impression>
<Creatives/>
</Wrapper>
</Ad>
</VAST>
</vmap:VASTAdData>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak breakId="485e36e3-50ed-4723-bf3a-826aa6d6e52f" breakType="linear" timeOffset="end">
<vmap:AdSource allowMultipleAds="true" followRedirects="true" id="1243253271">
<vmap:VASTAdData>
<VAST version="3.0" xmlns="http://www.iab.net/videosuite/vast">
<Ad id="485e36e3-50ed-4723-bf3a-826aa6d6e52f" sequence="1" xmlns="http://www.iab.net/videosuite/vast">
<Wrapper>
<AdSystem>SMART AdServer</AdSystem>
<VASTAdTagURI><![CDATA[https://www.arte.tv/static/artevpv7/vast/vast.xml]]></VASTAdTagURI>
<Error><![CDATA[https://example.com/error]]></Error>
<Impression><![CDATA[https://example.com/impression]]></Impression>
<Creatives/>
</Wrapper>
</Ad>
</VAST>
</vmap:VASTAdData>
</vmap:AdSource>
</vmap:AdBreak>
</vmap:VMAP>
30 changes: 30 additions & 0 deletions docs/fixtures/vmap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">
<vmap:AdBreak timeOffset="start" breakType="linear" breakId="preroll">
<vmap:AdSource id="preroll-ads" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">
https://opencdn.b-cdn.net/pub/5.0/e-v-1/preroll.xml
</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="00:00:03.123" breakType="linear" breakId="midroll">
<vmap:AdSource id="midroll-ads" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">
https://www.arte.tv/static/artevpv7/vast/vast.xml
</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="00:00:06.000" breakType="linear" breakId="midroll">
<vmap:AdSource id="midroll-ads" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">
https://www.arte.tv/static/artevpv7/vast/vast.xml
</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="end" breakType="linear" breakId="postroll">
<vmap:AdSource id="postroll" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">
https://opencdn.b-cdn.net/pub/5.0/e-v-1/postroll.xml
</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
</vmap:VMAP>
44 changes: 44 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<head>
<link href="https://vjs.zencdn.net/8.0.4/video-js.css" rel="stylesheet" />
</head>

<body>
<video id="my-video" class="video-js" controls preload="auto" width="640" height="360">
<source src="https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_30MB.mp4"
type="video/mp4" />
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a
web browser that
<a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</video>
<p><select name='vastUrl' id="vastUrl" onchange="document.location.href = '?vastUrl=' + this.value">
<option value=''>Select an adType</option>
<option
value='https://raw.githubusercontent.com/InteractiveAdvertisingBureau/VAST_Samples/master/VAST%204.2%20Samples/Inline_Simple.xml'>
Inline</option>
<option
value='https://raw.githubusercontent.com/InteractiveAdvertisingBureau/VAST_Samples/master/VAST%204.2%20Samples/Wrapper_Tag-test.xml'>
Wrapper</option>
<option value='https://www.arte.tv/static/artevpv7/vast/vast_skip.xml'>Skip</option>
<option
value='https://raw.githubusercontent.com/InteractiveAdvertisingBureau/VAST_Samples/master/VAST%204.2%20Samples/IconClickFallbacks.xml'>
Icon</option>
<option
value='https://raw.githubusercontent.com/InteractiveAdvertisingBureau/VAST_Samples/master/VAST%204.2%20Samples/Inline_Companion_Tag-test.xml'>
Companion</option>
<option
value='https://raw.githubusercontent.com/dailymotion/vast-client-js/b5a72b04226a6880da1e00191033edb150f6b956/test/vastfiles/wrapper-ad-pod.xml'>
Adpod</option>
<option
value='https://raw.githubusercontent.com/dailymotion/vast-client-js/b5a72b04226a6880da1e00191033edb150f6b956/test/vastfiles/empty-no-ad.xml'>
Empty VAST</option>
<option
value='https://raw.githubusercontent.com/InteractiveAdvertisingBureau/VAST_Samples/master/VAST%204.0%20Samples/Ad_Verification-test.xml'>
Ad Verification</option>
</select></p>
<script src="demo.js"></script>
<script>
document.getElementById('vastUrl').value = encodeURI(getURLParameter('vastUrl'));
</script>
</body>
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"build:cjs": "node ./esbuild.js -t commonjs",
"build:esm": "node ./esbuild.js -t es6",
"build:local": "yarn build && yalc push",
"bundle:demo": "esbuild ./src/demo.js --bundle --outfile=public/demo.js --minify --sourcemap",
"bundle:demo": "esbuild ./src/demo.js --bundle --outfile=docs/demo.js --minify --sourcemap",
"build": "yarn build:cjs && yarn build:esm",
"lint": "eslint ./src",
"start": "concurrently \"serve -l 3000 public\" \"watch --interval=1 'yarn bundle:demo' ./src/\"",
"start": "concurrently \"serve -l 3000 docs\" \"watch --interval=1 'yarn bundle:demo' ./src/\"",
"test": "npm run test:e2e",
"test:e2e": "npm run start && wait-on http://localhost:3000/ & cypress run --browser chrome",
"test:open": "cypress open",
Expand Down

0 comments on commit bb63625

Please sign in to comment.