| | 444 | |
| | 445 | == 5. Setting the Preferred Non-Linear Display Mode == |
| | 446 | |
| | 447 | It is now possible to set a "preferred" display mode for non-linear ads. This is useful when two display modes (HTML5 and Flash) are set to run concurrently and one should be given "preference" over the other. |
| | 448 | |
| | 449 | When multiple display modes are set, OVA gives the "flash" display mode preference by default - this means that when a creative is to be displayed in a region, by default OVA searches the enabled "flash" regions for a possible display slot before it assesses the HTML5 regions. |
| | 450 | |
| | 451 | If you wish to give HTML5 regions preference in the display, use the "preferred:<display-mode>" (e.g. `preferred:"html5"`) option as follows: |
| | 452 | |
| | 453 | {{{ |
| | 454 | { |
| | 455 | "ads": { |
| | 456 | "overlays": { |
| | 457 | "regions": { |
| | 458 | "preferred": "html5", |
| | 459 | "flash": [ |
| | 460 | { |
| | 461 | "region": "auto:bottom", |
| | 462 | "enable": true |
| | 463 | } |
| | 464 | ], |
| | 465 | "html5": [ |
| | 466 | { |
| | 467 | "region": "bottom", |
| | 468 | "enable": true, |
| | 469 | "overlay": false |
| | 470 | } |
| | 471 | ] |
| | 472 | } |
| | 473 | }, |
| | 474 | "schedule": [ |
| | 475 | { |
| | 476 | "startTime": "00:00:03", |
| | 477 | "duration": 10, |
| | 478 | "tag": "http://my-ad-tag/for-an-image-overlay.xml" |
| | 479 | }, |
| | 480 | { |
| | 481 | "startTime": "00:00:15", |
| | 482 | "duration": 40, |
| | 483 | "tag": "http://my-ad-tag/for-a-vpaid-overlay.xml" |
| | 484 | } |
| | 485 | ] |
| | 486 | } |
| | 487 | } |
| | 488 | }}} |
| | 489 | |
| | 490 | In the example above, two overlays are to be delivered - one at 3 seconds for 10 seconds, the other at 15 seconds for 40 seconds. The first is an image overlay, the second is a VPAID overlay. |
| | 491 | |
| | 492 | "html5" has been set as the "preferred" display mode. This means that when OVA attempts to display the ad creative, the "html5" regions (with an ID "bottom" in this case) will be given preference. Because VPAID ads cannot be displayed by HTML5 however, OVA will not match the "html5" region and will fallback to the flash display mode in this case. |
| | 493 | |
| | 494 | Flash display mode supports - image, text, vpaid, html and flash (non-VPAID) non-linear creative types while HTML5 mode supports image, text, html, flash (non-VPAID), iframe and Javascript non-linear creative types. |
| | 495 | |
| | 496 | You can see an example with the code snippet above running [http://static.openvideoads.org/qa/latest/ova.jwplayer.5x/examples/pages/overlays/preferred-mode/example03.html here]. |
| | 497 | |