Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add amp-ad support for ByPlay #25663

Merged
merged 5 commits into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ import {blade} from '../ads/blade';
import {brainy} from '../ads/brainy';
import {bringhub} from '../ads/bringhub';
import {broadstreetads} from '../ads/broadstreetads';
import {byplay} from '../ads/byplay';
import {caajainfeed} from '../ads/caajainfeed';
import {capirs} from '../ads/capirs';
import {caprofitx} from '../ads/caprofitx';
Expand Down Expand Up @@ -389,6 +390,7 @@ register('bodymovinanimation', bodymovinanimation);
register('brainy', brainy);
register('bringhub', bringhub);
register('broadstreetads', broadstreetads);
register('byplay', byplay);
register('caajainfeed', caajainfeed);
register('capirs', capirs);
register('caprofitx', caprofitx);
Expand Down
2 changes: 2 additions & 0 deletions ads/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ const adConfig = jsonConfiguration({
prefetch: 'https://cdn.broadstreetads.com/init-2.min.js',
},

'byplay': {},
daisato-tsumiki marked this conversation as resolved.
Show resolved Hide resolved

'caajainfeed': {
prefetch: ['https://cdn.amanad.adtdp.com/sdk/ajaamp.js'],
preconnect: ['https://ad.amanad.adtdp.com'],
Expand Down
28 changes: 28 additions & 0 deletions ads/byplay.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may need to change all these to 2020, we can see if the linter passes.

*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {loadScript, validateData} from '../3p/3p';

/**
* @param {!Window} global
* @param {!Object} data
*/
export function byplay(global, data) {
validateData(data, ['vastUrl']);

global.BYPLAY_VAST_URL = data['vastUrl'];

loadScript(global, 'https://cdn.byplay.net/amp-byplay-v2.js');
}
37 changes: 37 additions & 0 deletions ads/byplay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!---
Copyright 2019 The AMP HTML Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# ByPlay

## Example

```html
<amp-ad
width="320"
height="180"
type="byplay"
data-vast-url="https://h.f1.impact-ad.jp/adv?section_id=1234"
>
</amp-ad>
```

## Configuration

For configuration details and to generate your tags, please contact email: [byplayers@tsumikiinc.com](mailto:byplayers@tsumikiinc.com).

Required parameters:

- `data-vast-url`
7 changes: 7 additions & 0 deletions examples/ads.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
<option>blade</option>
<option>brainy</option>
<option>bringhub</option>
<option>byplay</option>
daisato-tsumiki marked this conversation as resolved.
Show resolved Hide resolved
<option>caajainfeed</option>
<option>capirs</option>
<option>caprofitx</option>
Expand Down Expand Up @@ -871,6 +872,12 @@ <h2>Bringhub Mini-Storefront</h2>
heights="(max-width: 270px) 1280px, (max-width:553px) 640px, 338px">
</amp-embed>

<h2>ByPlay</h2>
daisato-tsumiki marked this conversation as resolved.
Show resolved Hide resolved
<amp-ad width="400" height="225"
type="byplay"
data-vast-url="https://h.f1.impact-ad.jp/adv?section_id=7693&env=dev">
</amp-ad>

<h2>CA A.J.A. Infeed</h2>
<amp-ad width="320" height="120"
type="caajainfeed"
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-ad/amp-ad.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ See [amp-ad rules](https://github.com/ampproject/amphtml/blob/master/extensions/
- [Blade](../../ads/blade.md)
- [brainy](../../ads/brainy.md)
- [Broadstreet Ads](../../ads/broadstreetads.md)
- [ByPlay](../../ads/byplay.md)
- [CA A.J.A. Infeed](../../ads/caajainfeed.md)
- [CA-ProFit-X](../../ads/caprofitx.md)
- [Cedato](../../ads/cedato.md)
Expand Down