├── .eslintignore ├── .eslintrc.json ├── .github └── mistaken-pull-closer.yml ├── .gitignore ├── .travis.yml ├── APACHE-2.0 ├── AUTHORS ├── LICENSE ├── README.md ├── bower.json ├── config └── devices │ ├── amazon-firetv-default.json │ ├── amazon-firetv_2015-default.json │ ├── amazon-firetv_stick-default.json │ ├── ats-tv_2013-default.json │ ├── avtex-hbbtv_2014-default.json │ ├── bang_and_olufsen-beoplay_v1_tv_2012-default.json │ ├── bang_and_olufsen-tv_2012_crb-default.json │ ├── bt_vision-dps_1000-default.json │ ├── bt_vision-dps_1000_2015-default.json │ ├── cambridge-bd_2012-default.json │ ├── cello-bush_smart_tv_2012_c32z18fiptv-default.json │ ├── chrome-19_0-default.json │ ├── chrome-20_0-default.json │ ├── chrome-2_0-default.json │ ├── default-cehtml-default.json │ ├── default-css3anim-default.json │ ├── default-hbbtv-default.json │ ├── default-html-default.json │ ├── default-webkit-default.json │ ├── ee-tv_2014-default.json │ ├── firefox-1_0-default.json │ ├── gamestick-streamer_2013-default.json │ ├── goodmans-stb_2013-default.json │ ├── goodmans-stb_2013_gv102zrh-default.json │ ├── hisense-tv_2014-default.json │ ├── hisense-tv_2015-default.json │ ├── hitachi-hitachi_tv_2011-default.json │ ├── humax-fox_t2-default.json │ ├── humax-hdr_1000s-default.json │ ├── humax-humax_tv-default.json │ ├── humax-pvr_2013-default.json │ ├── humax-pvr_2015-default.json │ ├── humax-pvr_hd_2013-default.json │ ├── humax-stb_2014_dbt2200_youview-default.json │ ├── humax-stb_2015-default.json │ ├── humax-stb_2015_4000t_fvp-default.json │ ├── humax-stb_2015_t4000_youview-default.json │ ├── icecrypt-t2300hd_stb_2012-default.json │ ├── lg-bdp_2014_highend-default.json │ ├── lg-bdp_2014_midrange-default.json │ ├── lg-bdp_2015_midrange-default.json │ ├── lg-bluray_2012-default.json │ ├── lg-bluray_2013-default.json │ ├── lg-bluray_3d_2013-default.json │ ├── lg-bluray_3d_broadcom_2013-default.json │ ├── lg-mediastreamer_2012-default.json │ ├── lg-netcast_media_2010-default.json │ ├── lg-netcast_media_2011-default.json │ ├── lg-netcast_tv-default.json │ ├── lg-netcast_tv_2010-default.json │ ├── lg-tv_2011-default.json │ ├── lg-tv_2012_derivative_models-default.json │ ├── lg-tv_2012_highend-default.json │ ├── lg-tv_2012_midrange-default.json │ ├── lg-tv_2013_highend-default.json │ ├── lg-tv_2013_midrange-default.json │ ├── lg-tv_2014_highend-default.json │ ├── lg-tv_2014_ultrahighend-default.json │ ├── lg-tv_2015_a5lr-default.json │ ├── lg-tv_2015_highend-default.json │ ├── lg-tv_2015_lm14a-default.json │ ├── lg-tv_2015_lm14alite-default.json │ ├── lg-tv_2015_midrange-default.json │ ├── lg-tv_2015_ultrahighend-default.json │ ├── lg-tv_2016_h15p-default.json │ ├── lg-tv_2016_k2l-default.json │ ├── lg-tv_2016_m16-default.json │ ├── lg-tv_2016_m2-default.json │ ├── lg-tv_2016_ssp_m2-default.json │ ├── loewe-sl150-default.json │ ├── loewe-tv_2013-default.json │ ├── loewe-tv_2013_midrange-default.json │ ├── loewe-tv_2016_sl4-default.json │ ├── manhattan-hs8300-default.json │ ├── manhattan-stb_2013-default.json │ ├── mathembedded-reference_stb-default.json │ ├── microsoft-uwp-default.json │ ├── microsoft-xbox-one-default.json │ ├── microsoft-xboxone-default.json │ ├── motorola-stb_2012-default.json │ ├── netgear-ntv300-default.json │ ├── netgem-pvr_2014-default.json │ ├── nexus-player_2014-default.json │ ├── nintendo-wiiu-default.json │ ├── nowtv-box_v2-default.json │ ├── nowtv-stb_2013-default.json │ ├── nowtv-stb_2016_4500sk-default.json │ ├── nvidia-shieldtv_2015-default.json │ ├── opera-2014-default.json │ ├── opera-35-default.json │ ├── opera-9-default.json │ ├── opera-mobi-default.json │ ├── opera_hbbtv_emulator-beta-default.json │ ├── oppo-bdp_10x-default.json │ ├── oregan-iptv_stb_2014-default.json │ ├── oregan-onyx_tv_2010-default.json │ ├── orion-tv_2013-default.json │ ├── ouya-stb_2013-default.json │ ├── panasonic-bd_2012_mediatek-default.json │ ├── panasonic-bd_2014_highend-default.json │ ├── panasonic-bd_2014_midrange-default.json │ ├── panasonic-bd_2015_pro4-default.json │ ├── panasonic-bd_2015_pro4_fvp-default.json │ ├── panasonic-bd_2d_2013-default.json │ ├── panasonic-bd_2d_2014-default.json │ ├── panasonic-bd_2d_2015-default.json │ ├── panasonic-bd_3d_2013-default.json │ ├── panasonic-bd_3d_2013_st-default.json │ ├── panasonic-bd_3d_2014-default.json │ ├── panasonic-bd_3d_2014_mtk-default.json │ ├── panasonic-bd_3d_2015-default.json │ ├── panasonic-bd_3d_2015_mtk-default.json │ ├── panasonic-bdp_2016_ub900-default.json │ ├── panasonic-dmp_bdt110-default.json │ ├── panasonic-m8000-default.json │ ├── panasonic-tv_2011-default.json │ ├── panasonic-tv_2012-default.json │ ├── panasonic-tv_2012_highend_global-default.json │ ├── panasonic-tv_2012_volume_global-default.json │ ├── panasonic-tv_2013-default.json │ ├── panasonic-tv_2013_highend_global-default.json │ ├── panasonic-tv_2013_mt5590-default.json │ ├── panasonic-tv_2013_pro4-default.json │ ├── panasonic-tv_2013_volume_global-default.json │ ├── panasonic-tv_2014_highend-default.json │ ├── panasonic-tv_2014_highend_global-default.json │ ├── panasonic-tv_2014_lowend-default.json │ ├── panasonic-tv_2014_lowend_global-default.json │ ├── panasonic-tv_2014_midrange-default.json │ ├── panasonic-tv_2014_midrange_global-default.json │ ├── panasonic-tv_2014_topend-default.json │ ├── panasonic-tv_2014_topend_global-default.json │ ├── panasonic-tv_2014_volume-default.json │ ├── panasonic-tv_2014_volume_global-default.json │ ├── panasonic-tv_2015_highend-default.json │ ├── panasonic-tv_2015_lowend-default.json │ ├── panasonic-tv_2015_mb10x-default.json │ ├── panasonic-tv_2015_midrange-default.json │ ├── panasonic-tv_2015_midrange_fvp-default.json │ ├── panasonic-tv_2015_midrange_fvp_alt-default.json │ ├── panasonic-tv_2015_volume-default.json │ ├── panasonic-tv_2016_lowend-default.json │ ├── panasonic-tv_2016_midrange_fvp-default.json │ ├── philips-2012_tv-default.json │ ├── philips-2014_tv_highend-default.json │ ├── philips-avm_2012-default.json │ ├── philips-bd_2011-default.json │ ├── philips-bd_2013-default.json │ ├── philips-hmp7000_bluray_2012-default.json │ ├── philips-tv550_r3-default.json │ ├── philips-tv550_r4-default.json │ ├── philips-tv_2013_fusion-default.json │ ├── philips-tv_2013_mtk-default.json │ ├── philips-tv_2014_highend_antgalio-default.json │ ├── philips-tv_2014_midrange-default.json │ ├── philips-tv_2014_midrange_antgalio-default.json │ ├── philips-tv_2015_highend-default.json │ ├── philips-tv_2015_midrange-default.json │ ├── philips-tv_2016_midrange-default.json │ ├── philips-tv_2016_mt5800_fhd-default.json │ ├── philips-tv_3_2_1-default.json │ ├── pure-gemini_pvr_vl_61770-default.json │ ├── roku-dvp_2400eu-default.json │ ├── roku-dvp_2700eu-default.json │ ├── roku-dvp_3100eu-default.json │ ├── roku-dvp_4200eu-default.json │ ├── roku-streamer_2014-default.json │ ├── safari-525-default.json │ ├── safari-535-default.json │ ├── sagemcom-rti95_xxx_t2_uk-default.json │ ├── samsung-bd_broadcom2011-default.json │ ├── samsung-bd_e5-default.json │ ├── samsung-bd_e6-default.json │ ├── samsung-bd_e8-default.json │ ├── samsung-bd_es7-default.json │ ├── samsung-bd_firenze2011-default.json │ ├── samsung-bd_ht_2013-default.json │ ├── samsung-bd_ht_2014-default.json │ ├── samsung-bd_ht_2015-default.json │ ├── samsung-bd_ht_foxb_2013-default.json │ ├── samsung-bd_ht_foxb_2014-default.json │ ├── samsung-bdp_2015_hawkp-default.json │ ├── samsung-d8000-default.json │ ├── samsung-ht_e4-default.json │ ├── samsung-ht_e5-default.json │ ├── samsung-ht_e6-default.json │ ├── samsung-ht_e8-default.json │ ├── samsung-pe5-default.json │ ├── samsung-pe6-default.json │ ├── samsung-pe7-default.json │ ├── samsung-pe8-default.json │ ├── samsung-samsung_internet_tv_maple_5-default.json │ ├── samsung-samsung_internet_tv_maple_6-default.json │ ├── samsung-smart_tv-default.json │ ├── samsung-stb_e7-default.json │ ├── samsung-tv_2012-default.json │ ├── samsung-tv_2014_highend-default.json │ ├── samsung-tv_2014_lowend-default.json │ ├── samsung-tv_2014_midrange-default.json │ ├── samsung-tv_2014_nt14u-default.json │ ├── samsung-tv_2014_ultra_highend-default.json │ ├── samsung-tv_2014_volume-default.json │ ├── samsung-tv_2014_x14-default.json │ ├── samsung-tv_2015_hawkmfhd-default.json │ ├── samsung-tv_2015_hawkp-default.json │ ├── samsung-tv_2016_jazzl_tizen-default.json │ ├── samsung-tv_2016_jazzm_tizen-default.json │ ├── samsung-tv_foxp_2013-default.json │ ├── samsung-tv_x12_2013-default.json │ ├── seiki-tv_2014-default.json │ ├── sharp-le731-default.json │ ├── sharp-tv_2012-default.json │ ├── sharp-tv_2013-default.json │ ├── sharp-tv_2013_highend-default.json │ ├── sharp-tv_2014-default.json │ ├── sharp-tv_2016-default.json │ ├── sharp_blaupunkt-tv_2015-default.json │ ├── sharp_blaupunkt-tv_2016-default.json │ ├── sony-bdp6-default.json │ ├── sony-bdp_2010-default.json │ ├── sony-bdp_2011-default.json │ ├── sony-bdp_2012-default.json │ ├── sony-bdp_2013-default.json │ ├── sony-bdp_2014_highend-default.json │ ├── sony-bdp_2014_midrange-default.json │ ├── sony-bdp_2015_highend-default.json │ ├── sony-bdp_2015_midrange-default.json │ ├── sony-bdp_2016_ax-default.json │ ├── sony-bdp_2016_bx-default.json │ ├── sony-console_2014_psvita-default.json │ ├── sony-dtv_2011-default.json │ ├── sony-google_tv_nsz_gs7_2012-default.json │ ├── sony-hbbtv_2011-default.json │ ├── sony-hbbtv_2012-default.json │ ├── sony-hbbtv_2013-default.json │ ├── sony-hbbtv_2013_bis-default.json │ ├── sony-hbbtv_2014-default.json │ ├── sony-hbbtv_2015_highend-default.json │ ├── sony-hbbtv_2015_midrange-default.json │ ├── sony-kdl32cx523-default.json │ ├── sony-kdl40nx720-default.json │ ├── sony-playstation4-default.json │ ├── sony-playstation_3_webkit-default.json │ ├── sony-sony_bluray_bdp5_2010-default.json │ ├── sony-tv_2012-default.json │ ├── sony-tv_2015_highend-default.json │ ├── sony-tv_2015_highend_youview-default.json │ ├── sony-tv_2016_highend_youview-default.json │ ├── sony-tv_2016_midrange-default.json │ ├── st-reference-default.json │ ├── technika-22_212i-default.json │ ├── technika-tk500sdtr212-default.json │ ├── technika_media_streamer-tcmsaw11-default.json │ ├── tesco-tk500sdtr212_smart_stb_2012-default.json │ ├── tivo-opera-default.json │ ├── tivo-phase_6-default.json │ ├── tivo-webkit-default.json │ ├── toshiba-bd_2011-default.json │ ├── toshiba-bd_2013-default.json │ ├── toshiba-bdp_2d_2014-default.json │ ├── toshiba-bdp_3d_2014-default.json │ ├── toshiba-tl963-default.json │ ├── toshiba-tl968-default.json │ ├── toshiba-toshiba_2011-default.json │ ├── toshiba-toshiba_tv_2010-default.json │ ├── toshiba-tv_2013-default.json │ ├── toshiba-tv_2014-default.json │ ├── triax-stb_2013-default.json │ ├── verismo_verismobrowser-default.json │ ├── vestel-dvr_2014-default.json │ ├── vestel-dvr_2015-default.json │ ├── vestel-mb90-default.json │ ├── vestel-stb_2012-default.json │ ├── vestel-tv_2012-default.json │ ├── vestel-tv_2012_opera-default.json │ ├── vestel-tv_2013-default.json │ ├── vestel-tv_2013_crb-default.json │ ├── vestel-tv_2015_highend-default.json │ ├── vestel-tv_2015_highend_fvp-default.json │ ├── vestel-tv_2015_mb110_fvp-default.json │ ├── vestel-tv_2015_mb120-default.json │ ├── vestel-tv_2015_mb120_fvp-default.json │ ├── vestel-tv_2015_midrange-default.json │ ├── view21-vw11fvrhd-default.json │ ├── vodafone-stb_2015-default.json │ ├── wd-stb_2012-default.json │ ├── western_digital-live_streamer_stb_2012-default.json │ ├── western_digital-streamer_stb_2010-default.json │ ├── youview-stb_2013-default.json │ └── youview-stb_2013_highend-default.json ├── gruntfile.js ├── jsdoc └── footer.txt ├── node-test └── antieframeworktest.js ├── node └── antieframework.js ├── package.json ├── server-tests └── fixtures │ ├── applicationconfig │ ├── generic-tv1.json │ └── generic-tv2.json │ ├── deviceconfig │ ├── generic-tv1.json │ └── generic-tv2.json │ └── pagestrategy │ ├── default │ ├── README.md │ ├── body │ ├── doctype │ ├── header │ ├── mimetype │ └── rootelement │ └── pagestrategy1 │ ├── body │ ├── doctype │ ├── header │ ├── mimetype │ └── rootelement └── static ├── script-tests ├── api │ ├── gui.js │ ├── input.js │ ├── jquery.js │ ├── lifecycle.js │ └── testresults.js ├── fixtures │ ├── blank.html │ ├── components │ │ ├── buttoncomponent.js │ │ ├── emptycomponent.js │ │ ├── eventtestcomponent.js │ │ └── multipleshowcomponent.js │ ├── dynamicscript1.js │ ├── dynamicscript2.js │ ├── dynamicstylesheet.css │ ├── layouts │ │ ├── default.js │ │ └── toobig.js │ ├── requiremodule.js │ ├── test.json │ └── timedoutdynamicscript.js ├── jasmine │ ├── SpecRunner.html │ └── jstestdriver-adapter.js ├── lib │ ├── carousels.css │ ├── css3transitions.css │ ├── mockapplication.js │ ├── ondevicetestconfigvalidate.js │ ├── phantompolyfills.js │ ├── queuedrequire.js │ ├── require.js │ └── sinon.js ├── mocks │ └── mockelement.js └── tests │ ├── application-components.js │ ├── application-events.js │ ├── application-exit.js │ ├── application-initialisation.js │ ├── application-launchapp.js │ ├── application-layouts.js │ ├── application-routing.js │ ├── audiosource.js │ ├── callbackmanager.js │ ├── class.js │ ├── datasource.js │ ├── devices │ ├── anim │ │ ├── css3.js │ │ ├── css3 │ │ │ ├── existingtransitiondefinition.js │ │ │ ├── optionstransitiondefinition.js │ │ │ ├── skipanimtransitiondefinition.js │ │ │ ├── stringhelpers.js │ │ │ ├── transition.js │ │ │ ├── transitiondefinition.js │ │ │ ├── transitionelement.js │ │ │ └── transitionendpoints.js │ │ ├── css3transform.js │ │ ├── noanim.js │ │ ├── styletopleft.js │ │ └── tween.js │ ├── broadcastsource │ │ ├── basetvsourcetest.js │ │ ├── hbbtvsourcetest.js │ │ ├── samsungtvsourcetest.js │ │ ├── stubbedsourcetest.js │ │ └── tizentvsourcetest.js │ ├── browserdevice.js │ ├── device.js │ ├── exit │ │ ├── broadcast │ │ │ ├── netcast.js │ │ │ └── samsung_maple.js │ │ ├── destroyapplication.js │ │ ├── history.js │ │ ├── netcast.js │ │ ├── openclosewindow.js │ │ └── tivo.js │ ├── logging │ │ └── logging.js │ ├── mediaplayer │ │ ├── cehtml.js │ │ ├── cehtmlcommontests.js │ │ ├── cehtmlseekfinishedemiteventtest.js │ │ ├── commontests.js │ │ ├── html5.js │ │ ├── html5commontests.js │ │ ├── html5memoryleakunfix.js │ │ ├── html5seekfinishedemiteventtest.js │ │ ├── html5untyped.js │ │ ├── live │ │ │ ├── none.js │ │ │ ├── playable.js │ │ │ ├── restartable.js │ │ │ └── seekable.js │ │ ├── mediaplayer.js │ │ ├── samsung_maple.js │ │ ├── samsung_streaming.js │ │ └── samsung_streaming_2015.js │ ├── parentalguidance │ │ ├── appdefaultpghandler.js │ │ ├── basepghandler.js │ │ └── youviewpghandler.js │ ├── ps3basetest.js │ ├── storage │ │ ├── cookie.js │ │ ├── session.js │ │ └── xboxpls.js │ └── wiiu.js │ ├── formatter.js │ ├── historian.js │ ├── iterator.js │ ├── mediasource.js │ ├── queuedrequire.js │ ├── runtimecontext.js │ ├── sanitisers │ └── whitelisted.js │ ├── storageprovider.js │ ├── urlbuilder.js │ ├── videosource.js │ └── widgets │ ├── button.js │ ├── carousel.js │ ├── carousel │ ├── aligners │ │ ├── aligner.js │ │ └── alignmentqueue.js │ ├── binder.js │ ├── binders │ │ └── batchbinder.js │ ├── carouselcore.js │ ├── keyhandlers │ │ ├── activatefirsthandler.js │ │ ├── alignfirsthandler.js │ │ └── keyhandler.js │ ├── mask.js │ ├── navigators │ │ ├── bookendednavigator.js │ │ ├── testhelpers │ │ │ └── navigator.js │ │ └── wrappingnavigator.js │ ├── orientations │ │ ├── horizontal.js │ │ └── vertical.js │ ├── spinner.js │ └── strips │ │ ├── cullingstrip.js │ │ ├── utility │ │ ├── attachedstate.js │ │ ├── hiddenstate.js │ │ ├── initstate.js │ │ ├── renderedstate.js │ │ ├── visiblestate.js │ │ └── widgetcontext.js │ │ ├── widgetstrip.js │ │ └── wrappingstrip.js │ ├── component.js │ ├── componentcontainer.js │ ├── container.js │ ├── horizontalcarousel.js │ ├── horizontallist.js │ ├── image.js │ ├── keyboard.js │ ├── label.js │ ├── list.js │ ├── listitem.js │ ├── verticallist.js │ └── widget.js └── script ├── application.js ├── audiosource.js ├── callbackmanager.js ├── class.js ├── datasource.js ├── devices ├── anim │ ├── css3.js │ ├── css3 │ │ ├── easinglookup.js │ │ ├── existingtransitiondefinition.js │ │ ├── optionstransitiondefinition.js │ │ ├── skipanimtransitiondefinition.js │ │ ├── stringhelpers.js │ │ ├── transition.js │ │ ├── transitiondefinition.js │ │ └── transitionelement.js │ ├── css3transform.js │ ├── css3transform │ │ ├── animationfactory.js │ │ ├── transition.js │ │ ├── translate.js │ │ └── tween.js │ ├── noanim.js │ ├── shared │ │ ├── helpers.js │ │ └── transitionendpoints.js │ ├── styletopleft.js │ └── tween.js ├── broadcastsource │ ├── astrasource.js │ ├── basetvsource.js │ ├── hbbtvsource.js │ ├── samsungtvsource.js │ ├── stubbedsource.js │ └── tizentvsource.js ├── browserdevice.js ├── data │ ├── json2.js │ └── nativejson.js ├── device.js ├── exit │ ├── android.js │ ├── broadcast │ │ ├── netcast.js │ │ └── samsung_maple.js │ ├── closewindow.js │ ├── destroyapplication.js │ ├── history.js │ ├── netcast.js │ ├── openclosewindow.js │ ├── sagemcom.js │ ├── samsung_maple.js │ ├── samsung_tizen.js │ └── tivo.js ├── googletv.js ├── logging │ ├── alert.js │ ├── consumelog.js │ ├── default.js │ ├── jstestdriver.js │ ├── onscreen.js │ ├── saving.js │ └── xhr.js ├── mediaplayer │ ├── cehtml.js │ ├── cehtmlseekfinishedemitevent.js │ ├── html5.js │ ├── html5memoryleakunfix.js │ ├── html5seekfinishedemitevent.js │ ├── html5untyped.js │ ├── live │ │ ├── none.js │ │ ├── playable.js │ │ ├── restartable.js │ │ └── seekable.js │ ├── mediaplayer.js │ ├── samsung_maple.js │ ├── samsung_streaming.js │ ├── samsung_streaming_2015.js │ └── seekfinishedemitevent.js ├── parentalguidance │ ├── appdefaultpghandler.js │ ├── basepghandler.js │ ├── pgchallengeresponse.js │ └── youviewpghandler.js ├── ps3base.js ├── sanitiser.js ├── sanitisers │ └── whitelisted.js ├── storage │ ├── cookie.js │ ├── session.js │ └── xboxpls.js └── wiiu.js ├── events ├── afteralignevent.js ├── beforealignevent.js ├── beforeselecteditemchangeevent.js ├── blurevent.js ├── componentevent.js ├── databoundevent.js ├── event.js ├── focusdelayevent.js ├── focusevent.js ├── keyevent.js ├── mediaerrorevent.js ├── mediaevent.js ├── mediasourceerrorevent.js ├── networkstatuschangeevent.js ├── pagechangeevent.js ├── selecteditemchangeevent.js ├── selectevent.js ├── sliderchangeevent.js ├── textchangeevent.js ├── textpagechangeevent.js ├── tunerpresentingevent.js ├── tunerstoppedevent.js └── tunerunavailableevent.js ├── formatter.js ├── historian.js ├── iterator.js ├── lib ├── date.format.js ├── date.parse.js ├── intervalformat.js ├── math.seedrandom.js ├── require.js ├── sha1.js └── shifty.js ├── mediasource.js ├── packages └── core.js ├── runtimecontext.js ├── storageprovider.js ├── targets └── core.js ├── urlbuilder.js ├── videosource.js └── widgets ├── button.js ├── carousel.js ├── carousel ├── aligners │ ├── aligner.js │ └── alignmentqueue.js ├── binder.js ├── binders │ └── batchbinder.js ├── carouselcore.js ├── keyhandlers │ ├── activatefirsthandler.js │ ├── alignfirsthandler.js │ └── keyhandler.js ├── mask.js ├── navigators │ ├── bookendednavigator.js │ ├── navigator.js │ └── wrappingnavigator.js ├── orientations │ ├── horizontal.js │ └── vertical.js ├── spinner.js └── strips │ ├── cullingstrip.js │ ├── hidingstrip.js │ ├── utility │ ├── attachedstate.js │ ├── hiddenstate.js │ ├── initstate.js │ ├── renderedstate.js │ ├── state.js │ ├── states.js │ ├── visibilitystates.js │ ├── visiblestate.js │ └── widgetcontext.js │ ├── widgetstrip.js │ └── wrappingstrip.js ├── component.js ├── componentcontainer.js ├── container.js ├── grid.js ├── horizontalcarousel.js ├── horizontallist.js ├── horizontalprogress.js ├── horizontalslider.js ├── image.js ├── keyboard.js ├── label.js ├── list.js ├── listitem.js ├── scrubbar.js ├── state_view_container.js ├── textpager.js ├── verticallist.js └── widget.js /.eslintignore: -------------------------------------------------------------------------------- 1 | static/script/class.js 2 | static/script/lib/* 3 | static/script/devices/googletv.js 4 | static/script/devices/data/json2.js 5 | static/script/widgets/horizontalcarousel.js 6 | static/script-tests/lib/* 7 | static/script-tests/jasmine/* 8 | static/script-tests/fixtures/* 9 | static/script-tests/api/* 10 | -------------------------------------------------------------------------------- /.github/mistaken-pull-closer.yml: -------------------------------------------------------------------------------- 1 | # The JSONPath filter expression used to identify which PRs to close. 2 | # The data filtered is the pull request data along with other metadata passed in 3 | # by probot. 4 | # See http://linkremoved/ 5 | # `true` will close all PRs. 6 | filters: 7 | - true 8 | 9 | # The message to post to the closed PR. 10 | commentBody: | 11 | Thanks for your contribution! Unfortunately, we don't use GitHub pull 12 | requests as TAL is deprecated. Please see 13 | see [README.md](../blob/master/README.md) which provides full 14 | instructions on how to get involved. 15 | 16 | # Whether or not to add a label to the closed PR. 17 | # Default: true 18 | addLabel: true 19 | 20 | # The name of the label to add. 21 | # Default: invalid 22 | labelName: autoclosed 23 | 24 | # The desired color of the label, in the event that it needs to be created. 25 | # Default: e6e6e6 26 | labelColor: c0ffee -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .project 2 | *sublime-* 3 | .DS_Store 4 | /.settings 5 | libpeerconnection.log 6 | *.iml 7 | node_modules 8 | **/*npm-debug.log 9 | .idea 10 | static/script-tests/jasmine/WebRunner.html 11 | .grunt 12 | jsdoc/index.html 13 | jsdoc/files.html 14 | jsdoc/symbols 15 | config/pagestrategy 16 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | cache: node_modules 3 | language: node_js 4 | node_js: 5 | - "6" 6 | before_install: 7 | - npm install grunt-cli -g 8 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | dhurrell (https://github.com/dhurrell) 2 | jonpbbc (https://github.com/jonpbbc) 3 | tsadler1988 (https://github.com/tsadler1988) 4 | sdclibbery (https://github.com/sdclibbery) 5 | rthompson1991 (https://github.com/rthompson1991) 6 | rsjtaylor (https://github.com/rsjtaylor) 7 | mackstar (https://github.com/mackstar) 8 | LewisGoodwin (https://github.com/LewisGoodwin) 9 | jmalk (https://github.com/jmalk) 10 | ianarundale (https://github.com/ianarundale) 11 | landeiro (https://github.com/landeiro) 12 | drrobharper (https://github.com/drrobharper) 13 | subsidel (https://github.com/subsidel) 14 | JohnBogart (https://github.com/JohnBogart) 15 | bastuijnman (https://github.com/bastuijnman) 16 | davidbuckhurst (https://github.com/davidbuckhurst) 17 | ryanwaudby (https://github.com/ryanwaudby) 18 | andrewjackson001 (https://github.com/andrewjackson001) 19 | johnbeech (https://github.com/johnbeech) 20 | povilas0 (https://github.com/povilas0) 21 | laskop04 (https://github.com/laskop04) 22 | MamathaNair (https://github.com/MamathaNair) 23 | tgandrews (https://github.com/tgandrews) 24 | oncletom (https://github.com/oncletom) 25 | lukejpreston (https://github.com/lukejpreston) 26 | drpacman (https://github.com/drpacman) 27 | HSenane (https://github.com/HSenane) 28 | mlin6436 (https://github.com/mlin6436) 29 | KevRMitchell (https://github.com/KevRMitchell) 30 | domtronn (https://github.com/domtronn) 31 | chrisn (https://github.com/chrisn) 32 | joeyjojo (https://github.com/joeyjojo) 33 | cheunr02 (https://github.com/cheunr02) 34 | DNR500 (https://github.com/DNR500) 35 | brownj45 (https://github.com/brownj45) 36 | itamayo (https://github.com/itamayo) 37 | rickhuby (https://github.com/rickhuby) 38 | sergiopanseri (https://github.com/sergiopanseri) 39 | watsond88 (https://github.com/watsond88) 40 | AlexChesters (https://github.com/AlexChesters) 41 | MarkMurrayBBC (https://github.com/MarkMurrayBBC) 42 | ShiningTrapez (https://github.com/ShiningTrapez) 43 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-present British Broadcasting Corporation 2 | 3 | All rights reserved 4 | 5 | (http://www.bbc.co.uk) and TAL Contributors (1) 6 | 7 | (1) TAL Contributors are listed in the AUTHORS file and at 8 | https://github.com/bbc/tal/AUTHORS - please extend this file, 9 | not this notice. 10 | 11 | Licensed under the Apache License, Version 2.0 (the "License"); 12 | you may not use this file except in compliance with the License. 13 | You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Please contact us for an alternative licence 18 | 19 | Unless required by applicable law or agreed to in writing, software 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tal", 3 | "version": "10.0.0", 4 | "homepage": "http://fmtvp.github.io/tal/index.html", 5 | "description": "TAL was developed internally within the BBC as a way of vastly simplifying TV application development whilst increasing the reach of BBC TV applications such as iPlayer. Today all of the BBC’s HTML-based TV applications are built using TAL.", 6 | "main": "static/script/application.js", 7 | "moduleType": [ 8 | "amd" 9 | ], 10 | "keywords": [ 11 | "TAL", 12 | "Television", 13 | "Application", 14 | "Layer" 15 | ], 16 | "license": "https://github.com/bbc/tal/blob/master/LICENSE", 17 | "ignore": [ 18 | "jsdoc", 19 | "node-test", 20 | "php-test", 21 | "server-tests", 22 | ".bowerrc", 23 | ".gitignore", 24 | ".travis.yml", 25 | "APACHE-2.0", 26 | "AUTHORS", 27 | "bower.json", 28 | "gruntfile.js", 29 | "LICENSE", 30 | "package.json", 31 | "README.md", 32 | "static/script-tests" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /config/devices/bang_and_olufsen-beoplay_v1_tv_2012-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/default", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/parentalguidance/appdefaultpghandler" 13 | ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "streaming": { 19 | "video": { 20 | "mediaURIFormat": "%href%", 21 | "supported": [{ 22 | "protocols": [ 23 | "http" 24 | ], 25 | "encodings": [ 26 | "h264" 27 | ], 28 | "transferFormat": [ 29 | "plain" 30 | ], 31 | "maximumBitRate": 3600, 32 | "maximumVideoLines": 1080 33 | }] 34 | }, 35 | "audio": { 36 | "mediaURIFormat": "%href%", 37 | "supported": [{ 38 | "protocols": [ 39 | "http" 40 | ], 41 | "encodings": [ 42 | "aac" 43 | ], 44 | "maximumBitRate": 192 45 | }] 46 | } 47 | }, 48 | "input": { 49 | "map": { 50 | "38": "UP", 51 | "40": "DOWN", 52 | "37": "LEFT", 53 | "39": "RIGHT", 54 | "13": "ENTER" 55 | } 56 | }, 57 | "accessibility": { 58 | "captions": { 59 | "supported": [ 60 | "application/ttaf+xml" 61 | ] 62 | } 63 | }, 64 | "layouts": [{ 65 | "width": 960, 66 | "height": 540, 67 | "module": "%application%/appui/layouts/540p", 68 | "classes": [ 69 | "browserdevice540p" 70 | ] 71 | }, { 72 | "width": 1280, 73 | "height": 720, 74 | "module": "%application%/appui/layouts/720p", 75 | "classes": [ 76 | "browserdevice720p" 77 | ] 78 | }], 79 | "networking": { 80 | "supportsJSONP": true 81 | }, 82 | "capabilities": [], 83 | "statLabels": { 84 | "deviceType": "smarttv", 85 | "serviceType": "retail" 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /config/devices/mathembedded-reference_stb-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/styletopleft", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/storage/cookie", 11 | "antie/devices/logging/onscreen", 12 | "antie/devices/logging/xhr", 13 | "antie/devices/logging/jstestdriver", 14 | "antie/devices/exit/closewindow", 15 | "antie/devices/parentalguidance/appdefaultpghandler" 16 | ] 17 | }, 18 | "logging": { 19 | "level": "none" 20 | }, 21 | "streaming": { 22 | "video": { 23 | "mediaURIFormat": "%href%", 24 | "supported": [ 25 | { 26 | "protocols": [ 27 | "http" 28 | ], 29 | "encodings": [ 30 | "h264" 31 | ], 32 | "transferFormat": [ 33 | "hls", 34 | "plain" 35 | ], 36 | "maximumBitRate": 3600, 37 | "maximumVideoLines": 1080 38 | } 39 | ] 40 | }, 41 | "audio": { 42 | "mediaURIFormat": "%href%", 43 | "supported": [ 44 | { 45 | "protocols": [ 46 | "http" 47 | ], 48 | "encodings": [ 49 | "aac" 50 | ], 51 | "maximumBitRate": 192 52 | } 53 | ] 54 | } 55 | }, 56 | "input": { 57 | "map": { 58 | "13": "ENTER", 59 | "37": "LEFT", 60 | "38": "UP", 61 | "39": "RIGHT", 62 | "40": "DOWN" 63 | } 64 | }, 65 | "accessibility": { 66 | "captions": { 67 | "supported": [ 68 | "application/ttaf+xml" 69 | ] 70 | } 71 | }, 72 | "layouts": [ 73 | { 74 | "width": 960, 75 | "height": 540, 76 | "module": "%application%/appui/layouts/540p", 77 | "classes": [ 78 | "browserdevice540p" 79 | ] 80 | }, 81 | { 82 | "width": 1280, 83 | "height": 720, 84 | "module": "%application%/appui/layouts/720p", 85 | "classes": [ 86 | "browserdevice720p" 87 | ] 88 | } 89 | ], 90 | "networking": { 91 | "supportsJSONP": true 92 | }, 93 | "capabilities": [], 94 | "statLabels": { 95 | "serviceType": "other" 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /config/devices/microsoft-xbox-one-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/styletopleft", 7 | "antie/devices/mediaplayer/html5untyped", 8 | "antie/devices/mediaplayer/live/restartable", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/onscreen", 11 | "antie/devices/logging/xhr", 12 | "antie/devices/logging/jstestdriver", 13 | "xboxone/devices/storage/xboxpls" ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "displayQuality": "high", 19 | "streaming": { 20 | "video": { 21 | "mediaURIFormat": "%href%", 22 | "supported": [ 23 | { 24 | "protocols": [ 25 | "http" 26 | ], 27 | "encodings": [ 28 | "h264" 29 | ], 30 | "transferFormat": [ 31 | "hls" 32 | ], 33 | "maximumVideoLines": 1080 34 | } 35 | ] 36 | }, 37 | "audio": { 38 | "mediaURIFormat": "%href%", 39 | "supported": [ 40 | { 41 | "protocols": [ 42 | "http" 43 | ], 44 | "encodings": [ 45 | "aac" 46 | ], 47 | "maximumBitRate": 192 48 | } 49 | ] 50 | } 51 | }, 52 | "input": { 53 | "map": {} 54 | }, 55 | "accessibility": { 56 | "captions": { 57 | "supported": [ 58 | "application\/ttaf+xml" 59 | ] 60 | } 61 | }, 62 | "layouts": [ 63 | { 64 | "width": 1920, 65 | "height": 1080, 66 | "module": "%application%/appui/layouts/1080p", 67 | "classes": ["browserdevice1080p"] 68 | } 69 | ], 70 | "networking": { 71 | "supportsJSONP": false, 72 | "supportsCORS": true 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /config/devices/nowtv-stb_2013-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5seekfinishedemitevent", 8 | "antie/devices/mediaplayer/live/restartable", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/storage/cookie", 11 | "antie/devices/logging/onscreen", 12 | "antie/devices/logging/xhr", 13 | "antie/devices/logging/jstestdriver", 14 | "antie/devices/exit/closewindow", 15 | "antie/devices/parentalguidance/appdefaultpghandler" 16 | ] 17 | }, 18 | "logging": { 19 | "level": "none" 20 | }, 21 | "streaming": { 22 | "video": { 23 | "mediaURIFormat": "%href%", 24 | "supported": [{ 25 | "protocols": [ 26 | "http" 27 | ], 28 | "encodings": [ 29 | "h264" 30 | ], 31 | "transferFormat": [ 32 | "hls", 33 | "plain" 34 | ], 35 | "maximumVideoLines": 1080 36 | }] 37 | }, 38 | "audio": { 39 | "mediaURIFormat": "%href%", 40 | "supported": [{ 41 | "protocols": [ 42 | "http" 43 | ], 44 | "encodings": [ 45 | "aac" 46 | ], 47 | "maximumBitRate": 192 48 | }] 49 | } 50 | }, 51 | "input": { 52 | "map": { 53 | "13": "ENTER", 54 | "27": "BACK", 55 | "37": "LEFT", 56 | "38": "UP", 57 | "39": "RIGHT", 58 | "40": "DOWN", 59 | "227": "REWIND", 60 | "179": "PLAY_PAUSE", 61 | "228": "FAST_FWD" 62 | } 63 | }, 64 | "accessibility": { 65 | "captions": { 66 | "supported": [ 67 | "application/ttaf+xml" 68 | ] 69 | } 70 | }, 71 | "layouts": [{ 72 | "width": 960, 73 | "height": 540, 74 | "module": "%application%/appui/layouts/540p", 75 | "classes": [ 76 | "browserdevice540p" 77 | ] 78 | }, { 79 | "width": 1280, 80 | "height": 720, 81 | "module": "%application%/appui/layouts/720p", 82 | "classes": [ 83 | "browserdevice720p" 84 | ] 85 | }], 86 | "networking": { 87 | "supportsJSONP": true 88 | }, 89 | "capabilities": [], 90 | "statLabels": { 91 | "deviceType": "streamer", 92 | "serviceType": "retail" 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /config/devices/panasonic-m8000-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/default", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/parentalguidance/appdefaultpghandler" 13 | ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "streaming": { 19 | "video": { 20 | "mediaURIFormat": "%href%", 21 | "supported": [ 22 | { 23 | "protocols": [ 24 | "http" 25 | ], 26 | "encodings": [ 27 | "h264" 28 | ], 29 | "transferFormat": [ 30 | "plain" 31 | ] 32 | } 33 | ] 34 | }, 35 | "audio": { 36 | "mediaURIFormat": "%href%", 37 | "supported": [ 38 | { 39 | "protocols": [ 40 | "http" 41 | ], 42 | "encodings": [ 43 | "aac" 44 | ] 45 | } 46 | ] 47 | } 48 | }, 49 | "input": { 50 | "map": { 51 | "13": "ENTER", 52 | "37": "LEFT", 53 | "38": "UP", 54 | "39": "RIGHT", 55 | "40": "DOWN", 56 | "130": "PLAY_PAUSE", 57 | "132": "STOP", 58 | "134": "FAST_FWD", 59 | "133": "REWIND", 60 | "137": "SUBTITLE", 61 | "124": "BACK", 62 | "138": "INFO" 63 | } 64 | }, 65 | "accessibility": { 66 | "captions": { 67 | "supported": [ 68 | "application/ttaf+xml" 69 | ] 70 | } 71 | }, 72 | "layouts": [ 73 | { 74 | "width": 960, 75 | "height": 540, 76 | "module": "%application%/appui/layouts/540p", 77 | "classes": [ 78 | "browserdevice540p" 79 | ] 80 | }, 81 | { 82 | "width": 1280, 83 | "height": 720, 84 | "module": "%application%/appui/layouts/720p", 85 | "classes": [ 86 | "browserdevice720p" 87 | ] 88 | } 89 | ], 90 | "networking": { 91 | "supportsJSONP": true 92 | }, 93 | "capabilities": [], 94 | "statLabels": { 95 | "deviceType": "bd", 96 | "serviceType": "retail", 97 | "browserType": "chromium" 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /config/devices/philips-avm_2012-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/default", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/parentalguidance/appdefaultpghandler" 13 | ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "streaming": { 19 | "video": { 20 | "mediaURIFormat": "%href%", 21 | "supported": [ 22 | { 23 | "protocols": [ 24 | "http" 25 | ], 26 | "encodings": [ 27 | "h264" 28 | ], 29 | "transferFormat": [ 30 | "plain" 31 | ] 32 | } 33 | ] 34 | }, 35 | "audio": { 36 | "mediaURIFormat": "%href%", 37 | "supported": [ 38 | { 39 | "protocols": [ 40 | "http" 41 | ], 42 | "encodings": [ 43 | "aac" 44 | ] 45 | } 46 | ] 47 | } 48 | }, 49 | "input": { 50 | "map": { 51 | "13": "ENTER", 52 | "37": "LEFT", 53 | "38": "UP", 54 | "39": "RIGHT", 55 | "40": "DOWN", 56 | "415": "PLAY", 57 | "19": "PAUSE", 58 | "413": "STOP", 59 | "408": "FAST_FWD", 60 | "412": "REWIND", 61 | "8": "BACK", 62 | "460": "SUBTITLE", 63 | "455": "INFO" 64 | } 65 | }, 66 | "accessibility": { 67 | "captions": { 68 | "supported": [ 69 | "application/ttaf+xml" 70 | ] 71 | } 72 | }, 73 | "layouts": [ 74 | { 75 | "width": 960, 76 | "height": 540, 77 | "module": "%application%/appui/layouts/540p", 78 | "classes": [ 79 | "browserdevice540p" 80 | ] 81 | }, 82 | { 83 | "width": 1280, 84 | "height": 720, 85 | "module": "%application%/appui/layouts/720p", 86 | "classes": [ 87 | "browserdevice720p" 88 | ] 89 | } 90 | ], 91 | "networking": { 92 | "supportsJSONP": true 93 | }, 94 | "capabilities": [], 95 | "statLabels": { 96 | "serviceType": "retail" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /config/devices/philips-bd_2011-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/default", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/parentalguidance/appdefaultpghandler" 13 | ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "streaming": { 19 | "video": { 20 | "mediaURIFormat": "%href%", 21 | "supported": [ 22 | { 23 | "protocols": [ 24 | "http" 25 | ], 26 | "encodings": [ 27 | "h264" 28 | ], 29 | "transferFormat": [ 30 | "plain" 31 | ] 32 | } 33 | ] 34 | }, 35 | "audio": { 36 | "mediaURIFormat": "%href%", 37 | "supported": [ 38 | { 39 | "protocols": [ 40 | "http" 41 | ], 42 | "encodings": [ 43 | "aac" 44 | ] 45 | } 46 | ] 47 | } 48 | }, 49 | "input": { 50 | "map": { 51 | "13": "ENTER", 52 | "37": "LEFT", 53 | "38": "UP", 54 | "39": "RIGHT", 55 | "40": "DOWN", 56 | "415": "PLAY", 57 | "19": "PAUSE", 58 | "413": "STOP", 59 | "408": "FAST_FWD", 60 | "412": "REWIND", 61 | "8": "BACK", 62 | "460": "SUBTITLE", 63 | "455": "INFO" 64 | } 65 | }, 66 | "accessibility": { 67 | "captions": { 68 | "supported": [ 69 | "application/ttaf+xml" 70 | ] 71 | } 72 | }, 73 | "layouts": [ 74 | { 75 | "width": 960, 76 | "height": 540, 77 | "module": "%application%/appui/layouts/540p", 78 | "classes": [ 79 | "browserdevice540p" 80 | ] 81 | }, 82 | { 83 | "width": 1280, 84 | "height": 720, 85 | "module": "%application%/appui/layouts/720p", 86 | "classes": [ 87 | "browserdevice720p" 88 | ] 89 | } 90 | ], 91 | "networking": { 92 | "supportsJSONP": true 93 | }, 94 | "capabilities": [], 95 | "statLabels": { 96 | "deviceType": "bd", 97 | "serviceType": "retail" 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /config/devices/philips-hmp7000_bluray_2012-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/default", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/parentalguidance/appdefaultpghandler" 13 | ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "streaming": { 19 | "video": { 20 | "mediaURIFormat": "%href%", 21 | "supported": [ 22 | { 23 | "protocols": [ 24 | "http" 25 | ], 26 | "encodings": [ 27 | "h264" 28 | ], 29 | "transferFormat": [ 30 | "plain" 31 | ] 32 | } 33 | ] 34 | }, 35 | "audio": { 36 | "mediaURIFormat": "%href%", 37 | "supported": [ 38 | { 39 | "protocols": [ 40 | "http" 41 | ], 42 | "encodings": [ 43 | "aac" 44 | ] 45 | } 46 | ] 47 | } 48 | }, 49 | "input": { 50 | "map": { 51 | "13": "ENTER", 52 | "37": "LEFT", 53 | "38": "UP", 54 | "39": "RIGHT", 55 | "40": "DOWN", 56 | "415": "PLAY", 57 | "19": "PAUSE", 58 | "413": "STOP", 59 | "408": "FAST_FWD", 60 | "412": "REWIND", 61 | "8": "BACK", 62 | "460": "SUBTITLE", 63 | "455": "INFO" 64 | } 65 | }, 66 | "accessibility": { 67 | "captions": { 68 | "supported": [ 69 | "application/ttaf+xml" 70 | ] 71 | } 72 | }, 73 | "layouts": [ 74 | { 75 | "width": 960, 76 | "height": 540, 77 | "module": "%application%/appui/layouts/540p", 78 | "classes": [ 79 | "browserdevice540p" 80 | ] 81 | }, 82 | { 83 | "width": 1280, 84 | "height": 720, 85 | "module": "%application%/appui/layouts/720p", 86 | "classes": [ 87 | "browserdevice720p" 88 | ] 89 | } 90 | ], 91 | "networking": { 92 | "supportsJSONP": true 93 | }, 94 | "capabilities": [], 95 | "statLabels": { 96 | "deviceType": "bd", 97 | "serviceType": "retail" 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /config/devices/philips-tv550_r3-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/cehtml", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/default", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/parentalguidance/appdefaultpghandler" 13 | ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "streaming": { 19 | "video": { 20 | "mediaURIFormat": "%href%", 21 | "supported": [ 22 | { 23 | "protocols": [ 24 | "http" 25 | ], 26 | "encodings": [ 27 | "h264" 28 | ], 29 | "transferFormat": [ 30 | "plain" 31 | ] 32 | } 33 | ] 34 | }, 35 | "audio": { 36 | "mediaURIFormat": "%href%", 37 | "supported": [ 38 | { 39 | "protocols": [ 40 | "http" 41 | ], 42 | "encodings": [ 43 | "aac" 44 | ] 45 | } 46 | ] 47 | } 48 | }, 49 | "input": { 50 | "map": { 51 | "13": "ENTER", 52 | "37": "LEFT", 53 | "38": "UP", 54 | "39": "RIGHT", 55 | "40": "DOWN", 56 | "415": "PLAY", 57 | "19": "PAUSE", 58 | "413": "STOP", 59 | "408": "FAST_FWD", 60 | "412": "REWIND", 61 | "8": "BACK", 62 | "460": "SUBTITLE", 63 | "455": "INFO" 64 | } 65 | }, 66 | "accessibility": { 67 | "captions": { 68 | "supported": [ 69 | "application/ttaf+xml" 70 | ] 71 | } 72 | }, 73 | "layouts": [ 74 | { 75 | "width": 960, 76 | "height": 540, 77 | "module": "%application%/appui/layouts/540p", 78 | "classes": [ 79 | "browserdevice540p" 80 | ] 81 | }, 82 | { 83 | "width": 1280, 84 | "height": 720, 85 | "module": "%application%/appui/layouts/720p", 86 | "classes": [ 87 | "browserdevice720p" 88 | ] 89 | } 90 | ], 91 | "networking": { 92 | "supportsJSONP": true 93 | }, 94 | "capabilities": [], 95 | "statLabels": { 96 | "deviceType": "smarttv", 97 | "serviceType": "retail" 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /config/devices/philips-tv550_r4-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/cehtml", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/default", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/parentalguidance/appdefaultpghandler" 13 | ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "streaming": { 19 | "video": { 20 | "mediaURIFormat": "%href%", 21 | "supported": [ 22 | { 23 | "protocols": [ 24 | "http" 25 | ], 26 | "encodings": [ 27 | "h264" 28 | ], 29 | "transferFormat": [ 30 | "plain" 31 | ] 32 | } 33 | ] 34 | }, 35 | "audio": { 36 | "mediaURIFormat": "%href%", 37 | "supported": [ 38 | { 39 | "protocols": [ 40 | "http" 41 | ], 42 | "encodings": [ 43 | "aac" 44 | ] 45 | } 46 | ] 47 | } 48 | }, 49 | "input": { 50 | "map": { 51 | "13": "ENTER", 52 | "37": "LEFT", 53 | "38": "UP", 54 | "39": "RIGHT", 55 | "40": "DOWN", 56 | "415": "PLAY", 57 | "19": "PAUSE", 58 | "413": "STOP", 59 | "408": "FAST_FWD", 60 | "412": "REWIND", 61 | "8": "BACK", 62 | "460": "SUBTITLE", 63 | "455": "INFO" 64 | } 65 | }, 66 | "accessibility": { 67 | "captions": { 68 | "supported": [ 69 | "application/ttaf+xml" 70 | ] 71 | } 72 | }, 73 | "layouts": [ 74 | { 75 | "width": 960, 76 | "height": 540, 77 | "module": "%application%/appui/layouts/540p", 78 | "classes": [ 79 | "browserdevice540p" 80 | ] 81 | }, 82 | { 83 | "width": 1280, 84 | "height": 720, 85 | "module": "%application%/appui/layouts/720p", 86 | "classes": [ 87 | "browserdevice720p" 88 | ] 89 | } 90 | ], 91 | "networking": { 92 | "supportsJSONP": true 93 | }, 94 | "capabilities": [], 95 | "statLabels": { 96 | "deviceType": "smarttv", 97 | "serviceType": "retail" 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /config/devices/sagemcom-rti95_xxx_t2_uk-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/default", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/parentalguidance/appdefaultpghandler" 13 | ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "streaming": { 19 | "video": { 20 | "mediaURIFormat": "%href%", 21 | "supported": [{ 22 | "encodings": [ 23 | "h264" 24 | ], 25 | "protocols": [ 26 | "http" 27 | ], 28 | "transferFormat": [ 29 | "plain" 30 | ], 31 | "maximumBitRate": 3600, 32 | "maximumVideoLines": 1080 33 | }] 34 | }, 35 | "audio": { 36 | "mediaURIFormat": "%href%", 37 | "supported": [{ 38 | "encodings": [ 39 | "aac" 40 | ], 41 | "protocols": [ 42 | "http" 43 | ], 44 | "maximumBitRate": 192 45 | }] 46 | } 47 | }, 48 | "input": { 49 | "map": { 50 | "83": "SUBTITLE", 51 | "73": "INFO", 52 | "40": "DOWN", 53 | "13": "ENTER", 54 | "39": "RIGHT", 55 | "38": "UP", 56 | "37": "LEFT", 57 | "80": "PLAY", 58 | "85": "PAUSE", 59 | "79": "STOP", 60 | "70": "FAST_FWD", 61 | "82": "REWIND", 62 | "66": "BACK" 63 | } 64 | }, 65 | "accessibility": { 66 | "captions": { 67 | "supported": [ 68 | "application/ttaf+xml" 69 | ] 70 | } 71 | }, 72 | "layouts": [{ 73 | "width": 960, 74 | "height": 540, 75 | "classes": [ 76 | "browserdevice540p" 77 | ], 78 | "module": "%application%/appui/layouts/540p" 79 | }, { 80 | "width": 1280, 81 | "height": 720, 82 | "classes": [ 83 | "browserdevice720p" 84 | ], 85 | "module": "%application%/appui/layouts/720p" 86 | }], 87 | "networking": { 88 | "supportsJSONP": true 89 | }, 90 | "capabilities": [], 91 | "statLabels": { 92 | "serviceType": "retail" 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /config/devices/sony-console_2014_psvita-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "New 2014 device", 3 | "pageStrategy": "playstation3", 4 | "modules": { 5 | "base": "antie/devices/ps3base", 6 | "modifiers": [ 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/anim/css3", 10 | "antie/devices/data/nativejson", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/logging/onscreen", 13 | "antie/devices/logging/xhr", 14 | "antie/devices/logging/jstestdriver", 15 | "antie/devices/exit/history", 16 | "antie/devices/parentalguidance/appdefaultpghandler" 17 | ] 18 | }, 19 | "logging": { 20 | "level": "none" 21 | }, 22 | "streaming": { 23 | "video": { 24 | "mediaURIFormat": "%href%", 25 | "supported": [ 26 | { 27 | "protocols": [ 28 | "http" 29 | ], 30 | "encodings": [ 31 | "h264" 32 | ], 33 | "transferFormat": [ 34 | "hls", 35 | "plain" 36 | ], 37 | "maximumVideoLines": 1080 38 | } 39 | ] 40 | }, 41 | "audio": { 42 | "mediaURIFormat": "%href%", 43 | "supported": [ 44 | { 45 | "protocols": [ 46 | "http" 47 | ], 48 | "suppliers": [ 49 | "sis_http" 50 | ], 51 | "encodings": [ 52 | "aac" 53 | ] 54 | } 55 | ] 56 | } 57 | }, 58 | "input": { 59 | "map": { 60 | "13": "ENTER", 61 | "37": "LEFT", 62 | "38": "UP", 63 | "39": "RIGHT", 64 | "40": "DOWN" 65 | } 66 | }, 67 | "accessibility": { 68 | "captions": { 69 | "supported": [ 70 | "application/ttaf+xml" 71 | ] 72 | } 73 | }, 74 | "layouts": [ 75 | { 76 | "width": 1280, 77 | "height": 720, 78 | "module": "%application%/appui/layouts/720p", 79 | "classes": [ 80 | "browserdevice720p" 81 | ] 82 | } 83 | ], 84 | "networking": { 85 | "supportsJSONP": true 86 | }, 87 | "capabilities": [], 88 | "statLabels": { 89 | "deviceType": "console", 90 | "serviceType": "retail", 91 | "browserType": "opera" 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /config/devices/technika-22_212i-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/default", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/parentalguidance/appdefaultpghandler" 13 | ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "streaming": { 19 | "video": { 20 | "mediaURIFormat": "%href%", 21 | "supported": [ 22 | { 23 | "protocols": [ 24 | "http" 25 | ], 26 | "encodings": [ 27 | "h264" 28 | ], 29 | "transferFormat": [ 30 | "plain" 31 | ] 32 | } 33 | ] 34 | }, 35 | "audio": { 36 | "mediaURIFormat": "%href%", 37 | "supported": [ 38 | { 39 | "protocols": [ 40 | "http" 41 | ], 42 | "suppliers": [ 43 | "sis_http" 44 | ], 45 | "encodings": [ 46 | "aac" 47 | ] 48 | } 49 | ] 50 | } 51 | }, 52 | "input": { 53 | "map": { 54 | "13": "ENTER", 55 | "37": "LEFT", 56 | "38": "UP", 57 | "39": "RIGHT", 58 | "40": "DOWN", 59 | "44": "PAUSE", 60 | "49": "STOP", 61 | "41": "REWIND", 62 | "8": "BACK" 63 | } 64 | }, 65 | "accessibility": { 66 | "captions": { 67 | "supported": [ 68 | "application/ttaf+xml" 69 | ] 70 | } 71 | }, 72 | "layouts": [ 73 | { 74 | "width": 960, 75 | "height": 540, 76 | "module": "%application%/appui/layouts/540p", 77 | "classes": [ 78 | "browserdevice540p" 79 | ] 80 | }, 81 | { 82 | "width": 1280, 83 | "height": 720, 84 | "module": "%application%/appui/layouts/720p", 85 | "classes": [ 86 | "browserdevice720p" 87 | ] 88 | } 89 | ], 90 | "networking": { 91 | "supportsJSONP": true 92 | }, 93 | "capabilities": [], 94 | "statLabels": { 95 | "deviceType": "smarttv", 96 | "serviceType": "retail" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /config/devices/toshiba-bd_2011-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/logging/default", 10 | "antie/devices/storage/cookie", 11 | "antie/devices/parentalguidance/appdefaultpghandler" 12 | ] 13 | }, 14 | "logging": { 15 | "level": "none" 16 | }, 17 | "streaming": { 18 | "video": { 19 | "mediaURIFormat": "%href%", 20 | "supported": [{ 21 | "protocols": [ 22 | "http" 23 | ], 24 | "encodings": [ 25 | "h264" 26 | ], 27 | "transferFormat": [ 28 | "plain" 29 | ], 30 | "maximumBitRate": 3600, 31 | "maximumVideoLines": 1080 32 | }] 33 | }, 34 | "audio": { 35 | "mediaURIFormat": "%href%", 36 | "supported": [{ 37 | "protocols": [ 38 | "http" 39 | ], 40 | "encodings": [ 41 | "aac" 42 | ], 43 | "maximumBitRate": 192 44 | }] 45 | } 46 | }, 47 | "input": { 48 | "map": { 49 | "13": "ENTER", 50 | "37": "LEFT", 51 | "38": "UP", 52 | "39": "RIGHT", 53 | "40": "DOWN", 54 | "124": "BACK", 55 | "130": "PLAY_PAUSE", 56 | "132": "STOP", 57 | "133": "REWIND", 58 | "134": "FAST_FWD", 59 | "137": "SUBTITLE", 60 | "138": "INFO" 61 | } 62 | }, 63 | "accessibility": { 64 | "captions": { 65 | "supported": [ 66 | "application/ttaf+xml" 67 | ] 68 | } 69 | }, 70 | "layouts": [{ 71 | "width": 960, 72 | "height": 540, 73 | "module": "%application%/appui/layouts/540p", 74 | "classes": [ 75 | "browserdevice540p" 76 | ] 77 | }, { 78 | "width": 1280, 79 | "height": 720, 80 | "module": "%application%/appui/layouts/720p", 81 | "classes": [ 82 | "browserdevice720p" 83 | ] 84 | }], 85 | "networking": { 86 | "supportsJSONP": true 87 | }, 88 | "capabilities": [], 89 | "statLabels": { 90 | "deviceType": "bd", 91 | "serviceType": "retail" 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /config/devices/toshiba-toshiba_2011-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/exit/history", 11 | "antie/devices/logging/default", 12 | "antie/devices/storage/cookie", 13 | "antie/devices/parentalguidance/appdefaultpghandler" 14 | ] 15 | }, 16 | "logging": { 17 | "level": "none" 18 | }, 19 | "streaming": { 20 | "video": { 21 | "mediaURIFormat": "%href%", 22 | "supported": [{ 23 | "protocols": [ 24 | "http" 25 | ], 26 | "encodings": [ 27 | "h264" 28 | ], 29 | "transferFormat": [ 30 | "plain" 31 | ], 32 | "maximumBitRate": 3600, 33 | "maximumVideoLines": 1080 34 | }] 35 | }, 36 | "audio": { 37 | "mediaURIFormat": "%href%", 38 | "supported": [{ 39 | "protocols": [ 40 | "http" 41 | ], 42 | "encodings": [ 43 | "aac" 44 | ] 45 | }] 46 | } 47 | }, 48 | "input": { 49 | "map": { 50 | "8": "BACK_SPACE", 51 | "13": "ENTER", 52 | "19": "PAUSE", 53 | "32": "SPACE", 54 | "37": "LEFT", 55 | "38": "UP", 56 | "39": "RIGHT", 57 | "40": "DOWN", 58 | "412": "REWIND", 59 | "413": "STOP", 60 | "415": "PLAY", 61 | "417": "FAST_FWD", 62 | "457": "INFO", 63 | "460": "SUBTITLE", 64 | "461": "BACK", 65 | "463": "PLAY_PAUSE" 66 | } 67 | }, 68 | "accessibility": { 69 | "captions": { 70 | "supported": [ 71 | "application/ttaf+xml" 72 | ] 73 | } 74 | }, 75 | "layouts": [{ 76 | "width": 960, 77 | "height": 540, 78 | "module": "%application%/appui/layouts/540p", 79 | "classes": [ 80 | "browserdevice540p" 81 | ] 82 | }, { 83 | "width": 1280, 84 | "height": 720, 85 | "module": "%application%/appui/layouts/720p", 86 | "classes": [ 87 | "browserdevice720p" 88 | ] 89 | }], 90 | "networking": { 91 | "supportsJSONP": true 92 | }, 93 | "capabilities": [], 94 | "statLabels": { 95 | "deviceType": "smarttv", 96 | "serviceType": "retail" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /config/devices/toshiba-toshiba_tv_2010-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/default", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/parentalguidance/appdefaultpghandler" 13 | ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "streaming": { 19 | "video": { 20 | "mediaURIFormat": "%href%", 21 | "supported": [{ 22 | "protocols": [ 23 | "http" 24 | ], 25 | "encodings": [ 26 | "h264" 27 | ], 28 | "transferFormat": [ 29 | "plain" 30 | ], 31 | "maximumBitRate": 3600, 32 | "maximumVideoLines": 1080 33 | }] 34 | }, 35 | "audio": { 36 | "mediaURIFormat": "%href%", 37 | "supported": [{ 38 | "protocols": [ 39 | "http" 40 | ], 41 | "encodings": [ 42 | "aac" 43 | ] 44 | }] 45 | } 46 | }, 47 | "input": { 48 | "map": { 49 | "8": "BACK_SPACE", 50 | "13": "ENTER", 51 | "19": "PAUSE", 52 | "32": "SPACE", 53 | "37": "LEFT", 54 | "38": "UP", 55 | "39": "RIGHT", 56 | "40": "DOWN", 57 | "412": "REWIND", 58 | "413": "STOP", 59 | "415": "PLAY", 60 | "417": "FAST_FWD", 61 | "457": "INFO", 62 | "460": "SUBTITLE", 63 | "27": "BACK", 64 | "463": "PLAY_PAUSE" 65 | } 66 | }, 67 | "accessibility": { 68 | "captions": { 69 | "supported": [ 70 | "application/ttaf+xml" 71 | ] 72 | } 73 | }, 74 | "layouts": [{ 75 | "width": 960, 76 | "height": 540, 77 | "module": "%application%/appui/layouts/540p", 78 | "classes": [ 79 | "browserdevice540p" 80 | ] 81 | }, { 82 | "width": 1280, 83 | "height": 720, 84 | "module": "%application%/appui/layouts/720p", 85 | "classes": [ 86 | "browserdevice720p" 87 | ] 88 | }], 89 | "networking": { 90 | "supportsJSONP": true 91 | }, 92 | "capabilities": [], 93 | "statLabels": { 94 | "deviceType": "smarttv", 95 | "serviceType": "retail" 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /config/devices/vestel-tv_2012-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageStrategy": "html5", 3 | "modules": { 4 | "base": "antie/devices/browserdevice", 5 | "modifiers": [ 6 | "antie/devices/anim/noanim", 7 | "antie/devices/mediaplayer/html5", 8 | "antie/devices/mediaplayer/live/none", 9 | "antie/devices/data/nativejson", 10 | "antie/devices/logging/default", 11 | "antie/devices/storage/cookie", 12 | "antie/devices/parentalguidance/appdefaultpghandler" 13 | ] 14 | }, 15 | "logging": { 16 | "level": "none" 17 | }, 18 | "streaming": { 19 | "video": { 20 | "mediaURIFormat": "%href%", 21 | "supported": [ 22 | { 23 | "protocols": [ 24 | "http" 25 | ], 26 | "encodings": [ 27 | "h264" 28 | ], 29 | "transferFormat": [ 30 | "plain" 31 | ] 32 | } 33 | ] 34 | }, 35 | "audio": { 36 | "mediaURIFormat": "%href%", 37 | "supported": [ 38 | { 39 | "protocols": [ 40 | "http" 41 | ], 42 | "encodings": [ 43 | "aac" 44 | ] 45 | } 46 | ] 47 | } 48 | }, 49 | "input": { 50 | "map": { 51 | "13": "ENTER", 52 | "37": "LEFT", 53 | "38": "UP", 54 | "39": "RIGHT", 55 | "40": "DOWN", 56 | "19": "PLAY_PAUSE", 57 | "415": "PLAY", 58 | "413": "STOP", 59 | "417": "FAST_FWD", 60 | "412": "REWIND", 61 | "461": "BACK", 62 | "460": "SUBTITLE", 63 | "457": "INFO" 64 | } 65 | }, 66 | "accessibility": { 67 | "captions": { 68 | "supported": [ 69 | "application/ttaf+xml" 70 | ] 71 | } 72 | }, 73 | "layouts": [ 74 | { 75 | "width": 960, 76 | "height": 540, 77 | "module": "%application%/appui/layouts/540p", 78 | "classes": [ 79 | "browserdevice540p" 80 | ] 81 | }, 82 | { 83 | "width": 1280, 84 | "height": 720, 85 | "module": "%application%/appui/layouts/720p", 86 | "classes": [ 87 | "browserdevice720p" 88 | ] 89 | } 90 | ], 91 | "networking": { 92 | "supportsJSONP": true 93 | }, 94 | "capabilities": [], 95 | "statLabels": { 96 | "deviceType": "smarttv", 97 | "serviceType": "retail" 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /jsdoc/footer.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tal", 3 | "license": "Apache-2.0", 4 | "version": "10.0.0", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/bbc/tal.git" 8 | }, 9 | "description": "Library for building applications for Connected TV devices", 10 | "main": "./node/antieframework.js", 11 | "directories": { 12 | "node": "./node", 13 | "config": "./config", 14 | "static": "./static/script" 15 | }, 16 | "engines": { 17 | "npm": "~3.10.3" 18 | }, 19 | "devDependencies": { 20 | "eslint-plugin-jasmine": "^1.6.0", 21 | "eslint-plugin-requirejs": "^0.6.0", 22 | "grunt": "^0.4.5", 23 | "grunt-bump": "^0.6.0", 24 | "grunt-cli": "~0.1.6", 25 | "grunt-complexity": "^0.2.0", 26 | "grunt-contrib-jasmine": "0.9.2", 27 | "grunt-contrib-watch": "~0.6.1", 28 | "grunt-jsdoc": "^2.1.0", 29 | "grunt-shell": "^1.1.1", 30 | "grunt-text-replace": "^0.4.0", 31 | "gruntify-eslint": "^1.3.0" 32 | }, 33 | "dependencies": { 34 | "es5-shim": "^4.5.9", 35 | "tal-page-strategies": "1.1.7" 36 | }, 37 | "scripts": { 38 | "test": "grunt full --verbose", 39 | "test:unit": "grunt jasmine", 40 | "test:lint": "grunt lint" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /server-tests/fixtures/applicationconfig/generic-tv1.json: -------------------------------------------------------------------------------- 1 | { 2 | "deviceelements" : { 3 | "deviceelement1" : "overridetest", 4 | "deviceelement2" : "overridetest" 5 | }, 6 | "deviceConfigurationKey": "generic-tv1", 7 | "mediasets": { 8 | "tv": "overridetest", 9 | "radio": "stb-aac" 10 | }, 11 | "widgets": { 12 | "horizontalprogress": { 13 | "animate": false 14 | }, 15 | "componentcontainer": { 16 | "fade": false 17 | }, 18 | "horizontalcarousel": { 19 | "fade": false, 20 | "bindDelay": 1000 21 | } 22 | }, 23 | "components": { 24 | "player": { 25 | "slide": false, 26 | "fade": false 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /server-tests/fixtures/applicationconfig/generic-tv2.json: -------------------------------------------------------------------------------- 1 | { 2 | "deviceelements" : { 3 | "deviceelement1" : "overridetest", 4 | "deviceelement2" : "overridetest" 5 | }, 6 | "deviceConfigurationKey": "generic-tv2", 7 | "mediasets": { 8 | "tv": "overridetest", 9 | "radio": "stb-aac" 10 | }, 11 | "widgets": { 12 | "horizontalprogress": { 13 | "animate": false 14 | }, 15 | "componentcontainer": { 16 | "fade": false 17 | }, 18 | "horizontalcarousel": { 19 | "fade": false, 20 | "bindDelay": 1000 21 | } 22 | }, 23 | "components": { 24 | "player": { 25 | "slide": false, 26 | "fade": false 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /server-tests/fixtures/pagestrategy/default/README.md: -------------------------------------------------------------------------------- 1 | This folder contains a default page strategy for test purposes, including: 2 | * body 3 | * doctype ``` 4 | * header ( 5 | * mimetype `text/html` 6 | * rootelement `` 7 | -------------------------------------------------------------------------------- /server-tests/fixtures/pagestrategy/default/body: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server-tests/fixtures/pagestrategy/default/doctype: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server-tests/fixtures/pagestrategy/default/header: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server-tests/fixtures/pagestrategy/default/mimetype: -------------------------------------------------------------------------------- 1 | text/html -------------------------------------------------------------------------------- /server-tests/fixtures/pagestrategy/default/rootelement: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server-tests/fixtures/pagestrategy/pagestrategy1/body: -------------------------------------------------------------------------------- 1 | expectedbody -------------------------------------------------------------------------------- /server-tests/fixtures/pagestrategy/pagestrategy1/doctype: -------------------------------------------------------------------------------- 1 | expecteddoctype -------------------------------------------------------------------------------- /server-tests/fixtures/pagestrategy/pagestrategy1/header: -------------------------------------------------------------------------------- 1 | expectedheader -------------------------------------------------------------------------------- /server-tests/fixtures/pagestrategy/pagestrategy1/mimetype: -------------------------------------------------------------------------------- 1 | expectedmimetype -------------------------------------------------------------------------------- /server-tests/fixtures/pagestrategy/pagestrategy1/rootelement: -------------------------------------------------------------------------------- 1 | expectedrootelement -------------------------------------------------------------------------------- /static/script-tests/api/gui.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved. 3 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence 4 | */ 5 | 6 | var GuiApi = { 7 | 8 | isFocused : function (id) { 9 | var Application = require('antie/application'); 10 | var application = Application && Application.getCurrentApplication(); 11 | var focusedWidget = application && application.getFocussedWidget(); 12 | var widgetId = focusedWidget && focusedWidget.id; 13 | return widgetId === id; 14 | }, 15 | 16 | getTextContent : function(id) { 17 | var element = document.getElementById(id); 18 | return element.textContent; 19 | }, 20 | 21 | isVisible: function(id) { 22 | var element = document.getElementById(id); 23 | if (!element) { 24 | return false; 25 | } 26 | var style = element.style; 27 | return style && style.display !== 'none' && style.visibility !== 'hidden'; 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /static/script-tests/api/input.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved. 3 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence 4 | */ 5 | 6 | var InputApi = { 7 | keypress : function(keyName) { 8 | var Application = require('antie/application'); 9 | var KeyEvent = require('antie/events/keyevent'); 10 | var application = Application.getCurrentApplication(); 11 | application.bubbleEvent(new KeyEvent("keydown", KeyEvent[keyName])); 12 | application.bubbleEvent(new KeyEvent("keyup", KeyEvent[keyName])); 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /static/script-tests/api/lifecycle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved. 3 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence 4 | */ 5 | 6 | var LifecycleApi = { 7 | 8 | restart : function() { 9 | XMPP.stopConsumingMessages(); 10 | window.location.hash = ""; 11 | window.location.reload(true); 12 | }, 13 | 14 | redirect : function(to) { 15 | XMPP.stopConsumingMessages(); 16 | window.location.href = to; 17 | }, 18 | 19 | ping : function() { 20 | return true; 21 | }, 22 | 23 | start : function(arg, returnfunction, asyncflag) { 24 | require(["antie/application"], function(Application) { 25 | Application.prototype.forcedApplicationStart.apply(); 26 | returnfunction(true); 27 | } 28 | ); 29 | return asyncflag; 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /static/script-tests/api/testresults.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved. 3 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence 4 | */ 5 | 6 | var TestResults = { 7 | 8 | _createMessageBox : function (colour) { 9 | window.document.body.bgColor = colour; 10 | var failureMessageContainer = document.createElement("div"); 11 | failureMessageContainer.style.position = "absolute"; 12 | failureMessageContainer.style.top = "0%"; 13 | failureMessageContainer.style.left = "0%"; 14 | failureMessageContainer.style.padding = "10%"; 15 | failureMessageContainer.style.width = "100%"; 16 | failureMessageContainer.style.height = "100%"; 17 | failureMessageContainer.style.color = "#D6D6D6"; 18 | failureMessageContainer.style.backgroundColor = colour; 19 | document.body.appendChild(failureMessageContainer); 20 | return failureMessageContainer; 21 | }, 22 | 23 | passed : function() { 24 | var failureMessageContainer = TestResults._createMessageBox("#11D611"); 25 | failureMessageContainer.innerHTML += "All tests passed"; 26 | }, 27 | failed : function(failures) { 28 | var failureMessageContainer = TestResults._createMessageBox("#D61111"); 29 | failureMessageContainer.innerHTML += "Failed Scenarios :
MediaType.MEDIA_TYPE_AUDIO
.
24 | * @returns The media type of this content.
25 | */
26 | getMediaType: function getMediaType () {
27 | return MediaSource.MEDIA_TYPE_AUDIO;
28 | }
29 | });
30 |
31 | return AudioSource;
32 | });
33 |
--------------------------------------------------------------------------------
/static/script/class.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing antie.Class top-level base class.
3 | *
4 | * @see https://medium.com/netflix-techblog/improving-the-performance-of-our-javascript-inheritance-model-af376d75665
5 | */
6 |
7 | define('antie/class', function() {
8 | var initializing = false;
9 |
10 | // The base Class implementation (does nothing)
11 | var Class = function(){};
12 |
13 | // Create a new Class that inherits from this class
14 | Class.extend = function extend(prop) {
15 | var _super = this.prototype;
16 |
17 | // Instantiate a base class (but only create the instance,
18 | // don't run the init constructor)
19 | initializing = true;
20 | var prototype = new this();
21 | initializing = false;
22 |
23 | // Copy the properties over onto the new prototype
24 | for (var name in prop) {
25 | if (prop.hasOwnProperty(name)) {
26 | // if we're overwriting an existing function
27 | // set the base property
28 | var value = prop[name];
29 | if (typeof prop[name] === 'function' && typeof _super[name] === 'function'){
30 | value.base = _super[name];
31 | }
32 | prototype[name] = value;
33 | }
34 | }
35 |
36 | // The dummy class constructor
37 | function Class() {
38 | // All construction is actually done in the init method
39 | if (!initializing && this.init) {
40 | this.init.apply(this, arguments);
41 | }
42 | }
43 |
44 | // Populate our constructed prototype object
45 | Class.prototype = prototype;
46 |
47 | // Enforce the constructor to be what we expect
48 | Class.prototype.constructor = Class;
49 |
50 | // And make this class extendable
51 | Class.extend = arguments.callee;
52 |
53 | return Class;
54 | };
55 |
56 | return Class;
57 | });
58 |
--------------------------------------------------------------------------------
/static/script/devices/anim/css3/existingtransitiondefinition.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.devices.anim.css3.existingtransitiondefinition class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/devices/anim/css3/existingtransitiondefinition',
9 | [
10 | 'antie/devices/anim/css3/transitiondefinition'
11 | ],
12 | function(TransitionDefinition) {
13 | 'use strict';
14 | return TransitionDefinition.extend(
15 | {
16 | init: function init (transitionElement) {
17 | var properties, durations, delays, timingFns, i;
18 | init.base.call(this);
19 | properties = transitionElement.getProperties();
20 | durations = transitionElement.getDurations();
21 | delays = transitionElement.getDelays();
22 | timingFns = transitionElement.getTimingFns();
23 |
24 | for(i = 0; i !== properties.length; i += 1) {
25 | this.setProperty(
26 | properties[i],
27 | {
28 | duration: durations[i],
29 | timingFn: timingFns[i],
30 | delay: delays[i]
31 | }
32 | );
33 | }
34 | }
35 | }
36 | );
37 | }
38 | );
39 |
--------------------------------------------------------------------------------
/static/script/devices/anim/css3/optionstransitiondefinition.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.devices.anim.css3.existingtransitiondefinition class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/devices/anim/css3/optionstransitiondefinition',
9 | [
10 | 'antie/devices/anim/css3/transitiondefinition'
11 | ],
12 | function(TransitionDefinition) {
13 | 'use strict';
14 | return TransitionDefinition.extend(
15 | {
16 | /*
17 | * Transition definition from options.
18 | * @param animation options object
19 | * @param config animation configuration object
20 | */
21 | init: function init (options, config) {
22 | var property, timeEasing;
23 | config = config || {};
24 | init.base.call(this);
25 | for(property in options.to) {
26 | if(options.to.hasOwnProperty(property)) {
27 | timeEasing = options.easing || config.easing;
28 | this.setProperty(property, {
29 | duration: options.duration || config.duration,
30 | delay: options.delay,
31 | timingFn: timeEasing ? TransitionDefinition.easingLookup[timeEasing] : undefined
32 | });
33 | }
34 | }
35 | }
36 | }
37 | );
38 | }
39 | );
40 |
--------------------------------------------------------------------------------
/static/script/devices/anim/css3/skipanimtransitiondefinition.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.devices.anim.css3.existingtransitiondefinition class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/devices/anim/css3/skipanimtransitiondefinition',
9 | [
10 | 'antie/devices/anim/css3/transitiondefinition'
11 | ],
12 | function(TransitionDefinition) {
13 | 'use strict';
14 | return TransitionDefinition.extend(
15 | {
16 | init: function init (transDef) {
17 | init.base.call(this);
18 | this._copyToSelf(transDef);
19 | },
20 |
21 | _copyToSelf: function _copyToSelf (transDef) {
22 | var props, property, i;
23 | props = transDef.getProperties();
24 | for(i = 0; i !== props.length; i += 1) {
25 | property = props[i];
26 | this.setProperty(
27 | property,
28 | {
29 | duration: transDef.getPropertyDuration(property),
30 | delay: transDef.getPropertyDelay(property),
31 | timingFn: transDef.getPropertyTimingFn(property)
32 | }
33 | );
34 | }
35 | },
36 |
37 | getPropertyDuration: function getPropertyDuration () {
38 | return 0;
39 | }
40 | }
41 |
42 |
43 | );
44 | }
45 | );
46 |
--------------------------------------------------------------------------------
/static/script/devices/anim/css3transform/animationfactory.js:
--------------------------------------------------------------------------------
1 | define(
2 | 'antie/devices/anim/css3transform/animationfactory',
3 | [
4 | 'antie/devices/anim/css3transform/translate',
5 | 'antie/devices/anim/css3transform/tween'
6 | ],
7 | function (Translate, Tween) {
8 | 'use strict';
9 |
10 | return function (options) {
11 | if (options.to.left !== undefined) {
12 | return new Translate(options, options.to.left, 'left');
13 | }
14 | if (options.to.top !== undefined) {
15 | return new Translate(options, options.to.top, 'top');
16 | }
17 | return new Tween(options);
18 | };
19 | }
20 | );
21 |
--------------------------------------------------------------------------------
/static/script/devices/anim/css3transform/transition.js:
--------------------------------------------------------------------------------
1 | define(
2 | 'antie/devices/anim/css3transform/transition',
3 | [
4 | 'antie/devices/anim/shared/helpers',
5 | 'antie/devices/anim/css3/easinglookup'
6 | ],
7 | function (Helpers, EasingLookup) {
8 | 'use strict';
9 |
10 | var easingLookup = new EasingLookup();
11 |
12 | function getEasing(options) {
13 | var easing = options.easing || 'easeFromTo';
14 | return easingLookup[easing];
15 | }
16 |
17 | function set (el, properties, options) {
18 | var duration = (options.duration || 840) + 'ms ';
19 | var easing = getEasing(options);
20 | var transitions = properties.map(function (property) {
21 | return property + ' ' + duration + easing;
22 | }).join(',');
23 | Helpers.setStyle(el, 'transition', transitions, true);
24 | }
25 |
26 | function clear (el) {
27 | Helpers.setStyle(el, 'transition', '', true);
28 | }
29 |
30 | return {
31 | set: set,
32 | clear: clear
33 | };
34 | }
35 | );
36 |
--------------------------------------------------------------------------------
/static/script/devices/anim/css3transform/translate.js:
--------------------------------------------------------------------------------
1 | define(
2 | 'antie/devices/anim/css3transform/translate',
3 | [
4 | 'antie/devices/anim/shared/helpers',
5 | 'antie/devices/anim/css3transform/transition'
6 | ],
7 | function (Helpers, Transition) {
8 | 'use strict';
9 |
10 | return function (options, position, property) {
11 | var el = options.el;
12 | var onTransitionEnd, cancelledAnimation;
13 | var propertyTranslateMap = {
14 | left: 'translate3d({x}px, 0, 0)',
15 | top: 'translate3d(0, {x}px, 0)'
16 | };
17 |
18 | function getStyle () {
19 | var value = parseInt(el.style[property], 10);
20 | return value || 0;
21 | }
22 |
23 | function transform () {
24 | var distance = position - getStyle();
25 | var translate3d = propertyTranslateMap[property].replace('{x}', distance);
26 | Transition.set(el, ['transform'], options);
27 | Helpers.setStyle(el, 'transform', translate3d, true);
28 | }
29 |
30 | function endTransform () {
31 | Transition.clear(el);
32 |
33 | if (!cancelledAnimation) {
34 | Helpers.setStyle(el, 'transform', '', true);
35 | Helpers.setStyle(el, property, position + 'px', false);
36 | }
37 |
38 | if (options.onComplete) {
39 | options.onComplete();
40 | }
41 | }
42 |
43 | function start () {
44 | if (Helpers.skipAnim(options)) {
45 | endTransform();
46 | return;
47 | }
48 |
49 | onTransitionEnd = Helpers.registerTransitionEndEvent(el, endTransform);
50 | transform();
51 | }
52 |
53 | function stop () {
54 | cancelledAnimation = true;
55 | onTransitionEnd();
56 | }
57 |
58 | return {
59 | start: start,
60 | stop: stop
61 | };
62 | };
63 | }
64 | );
65 |
--------------------------------------------------------------------------------
/static/script/devices/anim/shared/helpers.js:
--------------------------------------------------------------------------------
1 | define(
2 | 'antie/devices/anim/shared/helpers',
3 | [
4 | 'antie/runtimecontext'
5 | ],
6 | function (RuntimeContext) {
7 | 'use strict';
8 |
9 | var VENDOR_PREFIXES = ['-webkit-', '-moz-', '-o-'];
10 | var TRANSITION_END_EVENTS = ['webkitTransitionEnd', 'oTransitionEnd', 'otransitionend', 'transitionend'];
11 |
12 | function setStyle (el, prop, val, prefixed) {
13 | if (prefixed) {
14 | for (var i = 0, len = VENDOR_PREFIXES.length; i < len; i++) {
15 | var prefix = VENDOR_PREFIXES[i];
16 | el.style.setProperty(prefix + prop, val.replace('transform', prefix + 'transform'));
17 | }
18 | }
19 | el.style.setProperty(prop, val);
20 | }
21 |
22 | function skipAnim (options) {
23 | return options.skipAnim || RuntimeContext.getDevice().getConfig().animationDisabled;
24 | }
25 |
26 | function addTransitionEvent (el, callback) {
27 | for (var i = 0, len = TRANSITION_END_EVENTS.length; i < len; i++) {
28 | el.addEventListener(TRANSITION_END_EVENTS[i], callback);
29 | }
30 | }
31 |
32 | function removeTransitionEvent (el, callback) {
33 | for (var i = 0, len = TRANSITION_END_EVENTS.length; i < len; i++) {
34 | el.removeEventListener(TRANSITION_END_EVENTS[i], callback);
35 | }
36 | }
37 |
38 | function registerTransitionEndEvent (el, callback) {
39 | var onComplete = function (evt) {
40 | if (!evt || evt.target === el) {
41 | removeTransitionEvent(el, onComplete);
42 | callback();
43 | }
44 | };
45 | addTransitionEvent(el, onComplete);
46 | return onComplete;
47 | }
48 |
49 | return {
50 | setStyle: setStyle,
51 | skipAnim: skipAnim,
52 | registerTransitionEndEvent: registerTransitionEndEvent
53 | };
54 | }
55 | );
56 |
--------------------------------------------------------------------------------
/static/script/devices/data/nativejson.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs modifier to use native JSON decoding/encoding if supported by the browser
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | * @deprecated since version 8.1.0, use JSON directly.
6 | */
7 |
8 | define(
9 | 'antie/devices/data/nativejson',
10 | ['antie/devices/browserdevice'],
11 | function(Device) {
12 | 'use strict';
13 |
14 | /* Patch Device.prototype.encodeJson and Device.prototype.decodeJson */
15 | Device.prototype.decodeJson = function(json) {
16 | return JSON.parse(json);
17 | };
18 | Device.prototype.encodeJson = function(obj) {
19 | return JSON.stringify(obj);
20 | };
21 | }
22 | );
23 |
--------------------------------------------------------------------------------
/static/script/devices/exit/android.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module for android exit strategy.
3 | * Uses a callback into 'Android' namespace for android WebView (or similar)
4 | * environment, to let Java-native application code clean up window/activity.
5 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
6 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
7 | */
8 |
9 | define(
10 | 'antie/devices/exit/android',
11 | ['antie/devices/browserdevice'],
12 | function(Device) {
13 | 'use strict';
14 |
15 | /**
16 | * Exits the application by invoking window.open() on the current window,
17 | * then window.close().
18 | */
19 | Device.prototype.exit = function() {
20 | /* Call into named 'Android' namespace to have Java handle exit. */
21 | Android.nativeApplicationExit();
22 | };
23 | }
24 | );
25 |
--------------------------------------------------------------------------------
/static/script/devices/exit/broadcast/netcast.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs modifier exit for netcast
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/devices/exit/broadcast/netcast',
9 | ['antie/devices/browserdevice'],
10 | function(Device) {
11 | 'use strict';
12 |
13 | /**
14 | * Exits the application by returning to broadcast using the NetcastExit function.
15 | */
16 | Device.prototype.exitToBroadcast = function() {
17 | window.NetCastExit();
18 | };
19 |
20 | }
21 | );
22 |
--------------------------------------------------------------------------------
/static/script/devices/exit/broadcast/samsung_maple.js:
--------------------------------------------------------------------------------
1 | /* global Common */
2 |
3 | /**
4 | * @fileOverview Requirejs modifier for samsung_maple exit
5 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
6 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
7 | */
8 |
9 | define(
10 | 'antie/devices/exit/broadcast/samsung_maple',
11 | ['antie/devices/browserdevice'],
12 | function(Device) {
13 | 'use strict';
14 |
15 | /**
16 | * Exits the application by returning to broadcast using the Samsung API.
17 | */
18 | Device.prototype.exitToBroadcast = function() {
19 | new Common.API.Widget().sendExitEvent();
20 | };
21 |
22 | }
23 | );
24 |
--------------------------------------------------------------------------------
/static/script/devices/exit/closewindow.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.devices.exit.closewindow class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/devices/exit/closewindow',
9 | ['antie/devices/browserdevice'],
10 | function(Device) {
11 | 'use strict';
12 |
13 | /**
14 | * Exits the application by invoking the window.close method
15 | */
16 | Device.prototype.exit = function() {
17 | window.close();
18 | };
19 |
20 | }
21 | );
22 |
--------------------------------------------------------------------------------
/static/script/devices/exit/destroyapplication.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the class for the destroyApplication exit strategy.
3 | * If following the OIPF spec, devices should do the same on a call to window.close()
4 | * as when using Application.destroyApplication, so this exit strategy is ONLY
5 | * necessary when a device does not follow the spec.
6 | * Otherwise, use the closewindow strategy. It's much simpler.
7 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
8 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
9 | */
10 |
11 | define(
12 | 'antie/devices/exit/destroyapplication',
13 | ['antie/devices/browserdevice'],
14 | function(Device) {
15 | 'use strict';
16 |
17 | // MIME type for the OIPF application manager, as defined by the spec (v1.2)
18 | // Spec: http://www.oipf.tv/specifications/root/volume-5-declarative-application-environment-r112/download
19 | var APPMANAGER_MIME_TYPE = 'application/oipfApplicationManager';
20 |
21 | /**
22 | * Exits the application by invoking Application.destroyApplication()
23 | * after getting the OIPF application manager. In theory, according to
24 | * the spec, this has the same effect as calling window.close().
25 | */
26 | Device.prototype.exit = function() {
27 | var factory = window.oipfObjectFactory;
28 |
29 | // Check that the OIPF factory is implemented and supports the application manager
30 | if(factory && factory.isObjectSupported(APPMANAGER_MIME_TYPE)) {
31 | var appManager = factory.createApplicationManagerObject();
32 |
33 | if(appManager) {
34 | // Ask the application manager for an Application object for this app
35 | var ownerApp = appManager.getOwnerApplication(window.document);
36 |
37 | if(ownerApp) {
38 | // Destroy this app and finish
39 | ownerApp.destroyApplication();
40 | }
41 | }
42 | }
43 | };
44 | }
45 | );
46 |
--------------------------------------------------------------------------------
/static/script/devices/exit/history.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.devices.exit.history class
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/devices/exit/history',
9 | ['antie/devices/browserdevice'],
10 | function(Device) {
11 | 'use strict';
12 |
13 | /**
14 | * Exits the application by navigating to the first page in the browsers history.
15 | */
16 | Device.prototype.exit = function() {
17 | var startPage = history.length -1;
18 | history.go(-startPage);
19 | };
20 |
21 | }
22 | );
23 |
--------------------------------------------------------------------------------
/static/script/devices/exit/netcast.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.devices.exit.netcast class
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/devices/exit/netcast',
9 | ['antie/devices/browserdevice'],
10 | function(Device) {
11 | 'use strict';
12 |
13 | /**
14 | * Exits the application by returning to the widget page using the NetcastBack function.
15 | */
16 | Device.prototype.exit = function() {
17 | window.NetCastBack();
18 | };
19 |
20 | }
21 | );
22 |
--------------------------------------------------------------------------------
/static/script/devices/exit/openclosewindow.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module for openclosewindow exit strategy.
3 | * Uses a workaround to make the browser think the current window
4 | * was opened by JavaScript, allowing window.close() to close it.
5 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
6 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
7 | */
8 |
9 | define(
10 | 'antie/devices/exit/openclosewindow',
11 | ['antie/devices/browserdevice'],
12 | function(Device) {
13 | 'use strict';
14 |
15 | /**
16 | * Exits the application by invoking window.open() on the current window,
17 | * then window.close().
18 | */
19 | Device.prototype.exit = function() {
20 | // Workaround to make the browser think this window was opened via script
21 | window.open('', '_self');
22 |
23 | // Close the current window
24 | window.close();
25 | };
26 | }
27 | );
28 |
--------------------------------------------------------------------------------
/static/script/devices/exit/sagemcom.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.devices.exit.sagemcom function.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/devices/exit/sagemcom',
9 | ['antie/devices/browserdevice'],
10 | function(Device) {
11 | 'use strict';
12 |
13 | /**
14 | * Exits the application by singalling the application iframe can be closed
15 | */
16 | Device.prototype.exit = function() {
17 | /* global parent: true */
18 | parent.postMessage('JS_EVENT_QUIT_THIRD_PARTY', '*');
19 | };
20 | }
21 | );
22 |
--------------------------------------------------------------------------------
/static/script/devices/exit/samsung_maple.js:
--------------------------------------------------------------------------------
1 | /* global Common */
2 |
3 | /**
4 | * @fileOverview Requirejs module containing base antie.devices.exit.samsung_maple class.
5 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
6 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
7 | */
8 |
9 | define('antie/devices/exit/samsung_maple', ['antie/devices/browserdevice'], function(Device) {
10 | 'use strict';
11 |
12 | /**
13 | * Exits the application by navigating to the first page in the browsers history.
14 | */
15 | Device.prototype.exit = function() {
16 | new Common.API.Widget().sendReturnEvent();
17 | };
18 |
19 | });
20 |
--------------------------------------------------------------------------------
/static/script/devices/exit/samsung_tizen.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module for Tizen exit strategy.
3 | * Relies on Samsung official documentation for Tizen located at:
4 | * http://www.samsungdforum.com/tizenapiguidie
5 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
6 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
7 | */
8 |
9 | define(
10 | 'antie/devices/exit/samsung_tizen',
11 | ['antie/devices/browserdevice'],
12 | function(Device) {
13 | 'use strict';
14 |
15 | /**
16 | * Exits the application by invoking exit() on the current application.
17 | */
18 | Device.prototype.exit = function() {
19 | // From http://www.samsungdforum.com/tizenapiguide/
20 | /* global tizen: true */
21 | tizen.application.getCurrentApplication().exit();
22 | };
23 | }
24 | );
25 |
--------------------------------------------------------------------------------
/static/script/devices/exit/tivo.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.devices.exit.tivo class for use with
3 | * tivo html-based system browser.
4 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
5 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
6 | */
7 |
8 | define(
9 | 'antie/devices/exit/tivo',
10 | ['antie/devices/browserdevice'],
11 | function(Device) {
12 | 'use strict';
13 |
14 | /**
15 | * Exits the application by returning to the widget page using the tivo function.
16 | */
17 | Device.prototype.exit = function() {
18 | /* global tivo: true */
19 | tivo.core.exit();
20 | };
21 |
22 | }
23 | );
24 |
--------------------------------------------------------------------------------
/static/script/devices/googletv.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.BrowserDevice subclass for Google TV devices.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define('antie/devices/googletv',
8 | [
9 | 'antie/devices/browserdevice',
10 | 'antie/runtimecontext'
11 | ],
12 | function(BrowserDevice, RuntimeContext) {
13 | 'use strict';
14 |
15 | return BrowserDevice.extend({
16 | init: function init (config) {
17 | // Change Application::getBestFitLayout to find the layout with a size
18 | // closest to that of the browser resolution, then use CSS zoom to fit
19 | // it to the exact screen size.
20 | RuntimeContext.getCurrentApplication().getBestFitLayout = function() {
21 | var _screenSize = this._device.getScreenSize();
22 | var _layouts = this._device.getConfig().layouts;
23 |
24 | // sort the layouts by closest to reported screen resolution first
25 | _layouts.sort(function(a, b) {
26 | var adiff = {
27 | width: Math.abs(_screenSize.width - a.width),
28 | height: Math.abs(_screenSize.height - a.height)
29 | };
30 | var bdiff = {
31 | width: Math.abs(_screenSize.width - b.width),
32 | height: Math.abs(_screenSize.height - b.height)
33 | };
34 | var ad = (adiff.width*adiff.width) + (adiff.height*bdiff.height),
35 | bd = (bdiff.width*bdiff.width) + (bdiff.height*bdiff.height);
36 |
37 | if(ad == bd) return 0;
38 | else if(ad < bd) return -1;
39 | else return 1;
40 | });
41 |
42 | var _selected = _layouts[0];
43 |
44 | // scale the closest layout to the exact screen resolution
45 | document.body.style.zoom = (screen.width / _selected.width);
46 |
47 | return _selected;
48 | };
49 |
50 | init.base.call(this, config);
51 | }
52 | });
53 | }
54 | );
55 |
--------------------------------------------------------------------------------
/static/script/devices/logging/alert.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.devices.logging.alert class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/devices/logging/alert',
9 | [
10 | 'module',
11 | 'antie/devices/device'
12 | ],
13 | function( Module, Device) {
14 | 'use strict';
15 |
16 | var loggingMethods = {
17 | /**
18 | * Sets the iterator pointer to the first item
19 | */
20 | log: function log () {
21 | alert('[LOG] ' + Array.prototype.join.call(arguments, '\n'));
22 | },
23 | debug: function debug () {
24 | alert('[DEBUG] ' + Array.prototype.join.call(arguments, '\n'));
25 | },
26 | info: function info () {
27 | alert('[INFO] ' + Array.prototype.join.call(arguments, '\n'));
28 | },
29 | warn: function warn () {
30 | alert('[WARN] ' + Array.prototype.join.call(arguments, '\n'));
31 | },
32 | error: function error () {
33 | alert('[ERROR] ' + Array.prototype.join.call(arguments, '\n'));
34 | }
35 | };
36 |
37 | Device.addLoggingStrategy( Module.id, loggingMethods );
38 | }
39 | );
40 |
--------------------------------------------------------------------------------
/static/script/devices/logging/consumelog.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.devices.logging.consumelog class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | // equivalent of logging to >dev/null
8 | define(
9 | 'antie/devices/logging/consumelog',
10 | [
11 | 'module',
12 | 'antie/devices/device'
13 | ],
14 | function( Module, Device ) {
15 | 'use strict';
16 |
17 | function ignore() {}
18 |
19 | var loggingMethods = {
20 | log: ignore,
21 | debug: ignore,
22 | info: ignore,
23 | warn: ignore,
24 | error: ignore
25 | };
26 |
27 | Device.addLoggingStrategy(Module.id, loggingMethods);
28 | }
29 | );
30 |
--------------------------------------------------------------------------------
/static/script/devices/logging/default.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.devices.logging.default class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | //logs to the javascript console
8 | define(
9 | 'antie/devices/logging/default',
10 | [
11 | 'module',
12 | 'antie/devices/device'
13 | ],
14 | function( Module, Device ) {
15 | 'use strict';
16 |
17 | var loggingMethods = {
18 | /**
19 | * Sets the iterator pointer to the first item
20 | */
21 | log: function log () {
22 | console.log.apply(console, arguments);
23 | },
24 | debug: function debug () {
25 | console.debug.apply(console, arguments);
26 | },
27 | info: function info () {
28 | console.info.apply(console, arguments);
29 | },
30 | warn: function warn () {
31 | console.warn.apply(console, arguments);
32 | },
33 | error: function error () {
34 | console.error.apply(console, arguments);
35 | }
36 | };
37 |
38 | Device.addLoggingStrategy( Module.id, loggingMethods );
39 | }
40 | );
41 |
--------------------------------------------------------------------------------
/static/script/devices/logging/jstestdriver.js:
--------------------------------------------------------------------------------
1 | /* global jstestdriver */
2 |
3 | /**
4 | * @fileOverview Requirejs module containing base antie.devices.logging.jstestdriver class.
5 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
6 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
7 | */
8 |
9 | //logs to the jstestdriver console
10 | define(
11 | 'antie/devices/logging/jstestdriver',
12 | [
13 | 'module',
14 | 'antie/devices/device'
15 | ],
16 | function( Module, Device ) {
17 | 'use strict';
18 |
19 | var loggingMethods = {
20 | /**
21 | * Sets the iterator pointer to the first item
22 | */
23 | log: function log () {
24 | jstestdriver.console.log.apply(jstestdriver.console, arguments);
25 | },
26 | debug: function debug () {
27 | jstestdriver.console.debug.apply(jstestdriver.console, arguments);
28 | },
29 | info: function info () {
30 | jstestdriver.console.info.apply(jstestdriver.console, arguments);
31 | },
32 | warn: function warn () {
33 | jstestdriver.console.warn.apply(jstestdriver.console, arguments);
34 | },
35 | error: function error () {
36 | jstestdriver.console.error.apply(jstestdriver.console, arguments);
37 | }
38 | };
39 |
40 | Device.addLoggingStrategy( Module.id, loggingMethods );
41 | }
42 | );
43 |
--------------------------------------------------------------------------------
/static/script/devices/logging/saving.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.devices.logging.saving class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | // Saves the logs for access later
8 | define(
9 | 'antie/devices/logging/saving',
10 | [
11 | 'module',
12 | 'antie/devices/device'
13 | ],
14 | function(Module, Device) {
15 | 'use strict';
16 |
17 | var logItems = [];
18 |
19 | var saveData = function (type, data) {
20 | var cleanedData = [];
21 | for (var i = 0; i < data.length; ++i) {
22 | cleanedData.push(data[i] + '');
23 | }
24 |
25 | logItems.push({ 'level': type, 'message': cleanedData });
26 | };
27 |
28 | var loggingMethods = {
29 | log: function log () {
30 | saveData('LOG', arguments);
31 | },
32 | debug: function debug () {
33 | saveData('DEBUG', arguments);
34 | },
35 | info: function info () {
36 | saveData('INFO', arguments);
37 | },
38 | warn: function warn () {
39 | saveData('WARN', arguments);
40 | },
41 | error: function error () {
42 | saveData('ERROR', arguments);
43 | }
44 | };
45 |
46 | Device.addLoggingStrategy(Module.id, loggingMethods);
47 | return { getLogItems: function getLogItems () {
48 | var data = logItems.slice(0);
49 | logItems = [];
50 | return data;
51 | }};
52 | }
53 | );
54 |
--------------------------------------------------------------------------------
/static/script/devices/mediaplayer/cehtmlseekfinishedemitevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing device modifier for CEHTML Seek finished media playback event
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/devices/mediaplayer/cehtmlseekfinishedemitevent',
9 | [
10 | 'antie/devices/mediaplayer/seekfinishedemitevent',
11 | 'antie/devices/mediaplayer/cehtml'
12 | ],
13 | function (SeekFinishedEmitEvent, CEHTML) {
14 | 'use strict';
15 |
16 | SeekFinishedEmitEvent(CEHTML);
17 |
18 | return CEHTML;
19 | }
20 | );
21 |
--------------------------------------------------------------------------------
/static/script/devices/mediaplayer/html5memoryleakunfix.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing device modifier for HTML5 media playback
3 | * on devices where clearing src on teardown causes problems.
4 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
5 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
6 | */
7 |
8 | define(
9 | 'antie/devices/mediaplayer/html5memoryleakunfix',
10 | [
11 | 'antie/devices/mediaplayer/html5'
12 | ],
13 | function(HTML5MediaPlayer) {
14 | 'use strict';
15 |
16 | HTML5MediaPlayer.prototype._unloadMediaSrc = function(){};
17 |
18 | return HTML5MediaPlayer;
19 | }
20 | );
21 |
--------------------------------------------------------------------------------
/static/script/devices/mediaplayer/html5seekfinishedemitevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
3 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
4 | */
5 |
6 | define(
7 | 'antie/devices/mediaplayer/html5seekfinishedemitevent',
8 | [
9 | 'antie/devices/mediaplayer/seekfinishedemitevent',
10 | 'antie/devices/mediaplayer/html5'
11 | ],
12 | function (SeekFinishedEmitEvent, HTML5) {
13 | 'use strict';
14 |
15 | SeekFinishedEmitEvent(HTML5);
16 |
17 | return HTML5;
18 | }
19 | );
20 |
--------------------------------------------------------------------------------
/static/script/devices/mediaplayer/html5untyped.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing device modifier for HTML5 media
3 | * playback without MIME type in source element
4 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
5 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
6 | */
7 |
8 | define(
9 | 'antie/devices/mediaplayer/html5untyped',
10 | [
11 | 'antie/runtimecontext',
12 | 'antie/devices/device',
13 | 'antie/devices/mediaplayer/html5'
14 | ],
15 | function(RuntimeContext, Device, HTML5MediaPlayer) {
16 | 'use strict';
17 |
18 | /**
19 | * Main MediaPlayer implementation for HTML5 devices specifies a 'type'
20 | * attribute in the source element.
21 | * This device modifier implements a new version of the function to
22 | * generate the source element without setting a type attribute.
23 | * @name antie.devices.mediaplayer.HTML5Untyped
24 | * @class
25 | * @extends antie.devices.mediaplayer.HTML5
26 | */
27 | var Player = HTML5MediaPlayer.extend( /** @lends antie.devices.mediaplayer.HTML5Untyped.prototype */ {
28 | init: function init () {
29 | init.base.call(this);
30 | },
31 |
32 | _generateSourceElement: function _generateSourceElement (url) {
33 | var device = RuntimeContext.getDevice();
34 | var sourceElement = device._createElement('source');
35 | sourceElement.src = url;
36 | return sourceElement;
37 | }
38 | });
39 |
40 | var instance = new Player();
41 |
42 | // Mixin this MediaPlayer implementation, so that
43 | // device.getMediaPlayer() returns the correct implementation for the
44 | // device
45 | Device.prototype.getMediaPlayer = function() {
46 | return instance;
47 | };
48 |
49 | return Player;
50 | }
51 | );
52 |
--------------------------------------------------------------------------------
/static/script/devices/mediaplayer/live/none.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing device modifier for live playback
3 | * with support level none
4 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
5 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
6 | */
7 |
8 | define(
9 | 'antie/devices/mediaplayer/live/none',
10 | [
11 | 'antie/devices/device',
12 | 'antie/devices/mediaplayer/mediaplayer'
13 | ],
14 | function (Device, MediaPlayer) {
15 | 'use strict';
16 |
17 | Device.prototype.getLivePlayer = function () {
18 | return null;
19 | };
20 |
21 | Device.prototype.getLiveSupport = function () {
22 | return MediaPlayer.LIVE_SUPPORT.NONE;
23 | };
24 | }
25 | );
26 |
--------------------------------------------------------------------------------
/static/script/devices/parentalguidance/appdefaultpghandler.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
3 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
4 | */
5 |
6 | define(
7 | 'antie/devices/parentalguidance/appdefaultpghandler',
8 | [
9 | 'antie/devices/browserdevice',
10 | 'antie/devices/parentalguidance/basepghandler'
11 | ],
12 | function (Device, BasePgHandler) {
13 | 'use strict';
14 |
15 | var appDefaultPgHandler = BasePgHandler.extend({
16 |
17 | isChallengeActive: function isChallengeActive () {
18 | if (this._appHandler) {
19 | return this._appHandler.isChallengeActive();
20 | } else {
21 | throw new Error('No default parental guidance handler is registered');
22 | }
23 | },
24 | showChallenge: function showChallenge (message, guidanceChallengeResponseCallBack) {
25 | if (!this._appHandler) {
26 | throw new Error('No default parental guidance handler is registered');
27 | } else if (typeof(guidanceChallengeResponseCallBack.onGuidanceChallengeResponse) !== 'function') {
28 | throw new Error('The guidanceChallengeResponseCallback object should contain an onGuidanceChallengeResponse' +
29 | 'function. The appHandler should call this function with a value from pgchallengeresponse.js as the first parameter');
30 | } else {
31 | return this._appHandler.showChallenge(message, guidanceChallengeResponseCallBack);
32 | }
33 | },
34 | supportsMessage: function supportsMessage () {
35 | return true;
36 | },
37 | isConfigurable: function isConfigurable () {
38 | return true;
39 | }
40 | });
41 |
42 | Device.prototype.parentalGuidanceHelper = new appDefaultPgHandler;
43 |
44 | /**
45 | *
46 | * @param {object} containing implementation of showChallenge() and isChallengeActive()
47 | */
48 | Device.prototype.registerAppPgHandler = function(appHandler) {
49 | this.parentalGuidanceHelper._appHandler = appHandler;
50 | };
51 |
52 | }
53 | );
54 |
--------------------------------------------------------------------------------
/static/script/devices/parentalguidance/basepghandler.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
3 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
4 | */
5 |
6 | define('antie/devices/parentalguidance/basepghandler',
7 | [
8 | 'antie/class'
9 | ],
10 | function(Class) {
11 | 'use strict';
12 |
13 | var BasePgHandler = Class.extend({
14 |
15 | /**
16 | * Has the user already setup a PIN/Password for PG?
17 | * @returns {boolean}
18 | */
19 | isChallengeActive: function isChallengeActive () {
20 | throw new Error('IsChallengeActive method has not been implemented.');
21 | },
22 | /**
23 | * Show UI for pin challenge
24 | * @param {string} optional message to display when showing challenge.
25 | * @param {Object} callback object containing onGuidanceChallengeResponse(response) function
26 | * where response is defined by object in pgchallengeresponse
27 | */
28 | showChallenge: function showChallenge () {
29 | throw new Error('ShowChallenge method has not been implemented.');
30 | },
31 | /**
32 | * Determines whether handler can display PG message as part of its PIN challenge
33 | * @returns {boolean}
34 | */
35 | supportsMessage: function supportsMessage () {
36 | throw new Error('SupportsMessage method has not been implemented.');
37 | },
38 | /**
39 | * Determines whether handler can handle display of PG settings screen.
40 | * @returns {boolean}
41 | */
42 | isConfigurable: function isConfigurable () {
43 | throw new Error('IsConfigurable method has not been implemented.');
44 | }
45 | });
46 |
47 | return BasePgHandler;
48 | }
49 | );
50 |
--------------------------------------------------------------------------------
/static/script/devices/parentalguidance/pgchallengeresponse.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
3 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
4 | */
5 |
6 | define(
7 | 'antie/devices/parentalguidance/pgchallengeresponse',
8 | [],
9 | function () {
10 | 'use strict';
11 |
12 | return {
13 | NOT_AUTHORISED: 0,
14 | AUTHORISED: 1,
15 | ERROR: 2,
16 | CHALLENGE_NOT_SET: 3
17 | };
18 | });
19 |
--------------------------------------------------------------------------------
/static/script/devices/sanitiser.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview A base implementation for sanitisation strategies
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define('antie/devices/sanitiser', [], function () {
8 |
9 | 'use strict';
10 |
11 | function Sanitiser (string) {
12 | this._string = string;
13 | }
14 |
15 | Sanitiser.prototype.setElementContent = function (el, enableHTML) {
16 | el[enableHTML? 'innerHTML' : 'textContent'] = this._string;
17 | };
18 |
19 | return Sanitiser;
20 | });
21 |
--------------------------------------------------------------------------------
/static/script/devices/storage/session.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module to present temporary storage for the session
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/devices/storage/session',
9 | ['antie/storageprovider'],
10 | function(StorageProvider) {
11 | 'use strict';
12 |
13 | var namespaces = {};
14 | var SessionStorage = StorageProvider.extend({});
15 |
16 | SessionStorage.getNamespace = function(namespace) {
17 | if(!namespaces[namespace]) {
18 | namespaces[namespace] = new SessionStorage();
19 | }
20 | return namespaces[namespace];
21 | };
22 |
23 | return SessionStorage;
24 | }
25 | );
26 |
--------------------------------------------------------------------------------
/static/script/devices/storage/xboxpls.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
3 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
4 | */
5 |
6 | define(
7 | 'antie/devices/storage/xboxpls',
8 | [
9 | 'antie/devices/browserdevice',
10 | 'antie/storageprovider'
11 | ],
12 | function(Device, StorageProvider) {
13 | 'use strict';
14 |
15 | var namespaces = {};
16 |
17 | var XboxStorage = StorageProvider.extend({
18 | init: function init () {
19 | /* global Windows: true */
20 | this._storage = Windows.Storage.ApplicationData.current.localSettings.values;
21 |
22 | },
23 |
24 | getItem: function getItem (key) {
25 | if (this._storage.hasKey(key)) {
26 | var value = this._storage.lookup(key);
27 | var jsonifiedValue = JSON.parse(value);
28 |
29 | if (jsonifiedValue === null) {
30 | return undefined;
31 | }
32 |
33 | return jsonifiedValue;
34 | }
35 | return undefined;
36 | },
37 |
38 | setItem: function setItem (key, value) {
39 | this._storage.insert(key, JSON.stringify(value));
40 | },
41 |
42 | removeItem: function removeItem (key) {
43 | this._storage.insert(key, null);
44 | },
45 |
46 | clear: function clear () {
47 | this._storage.clear();
48 | },
49 |
50 | isEmpty: function isEmpty () {
51 | return this._storage.Size === 0;
52 | }
53 | });
54 |
55 | Device.prototype.getPersistentStorage = function(namespace) {
56 | if(!namespaces[namespace]) {
57 | namespaces[namespace] = new XboxStorage(namespace);
58 | }
59 | return namespaces[namespace];
60 | };
61 | }
62 | );
63 |
--------------------------------------------------------------------------------
/static/script/events/afteralignevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the after align event
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/afteralignevent',
9 | ['antie/events/event'],
10 | function (Event) {
11 | 'use strict';
12 | /**
13 | * Class of events raised when a Mask is about to change alignment of its widget strip.
14 | * @name antie.events.AfterAlignEvent
15 | * @class
16 | * @extends antie.events.Event
17 | * @param {antie.widgets.carousel.Mask} target The mask that is about to align the strip
18 | * @param {Integer} to the index into the strip of the index alignment is moving to
19 | * @param {Integer} from the index into the strip of the index alignment is moving from
20 | */
21 | return Event.extend(/** @lends antie.events.AfterAlignEvent.prototype */ {
22 | /**
23 | * @constructor
24 | * @ignore
25 | */
26 | init: function init (target, alignedIndex) {
27 | this.target = target;
28 | this.alignedIndex = alignedIndex;
29 | init.base.call(this, 'afteralign');
30 | }
31 | });
32 | }
33 | );
34 |
--------------------------------------------------------------------------------
/static/script/events/beforealignevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the before align event
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define('antie/events/beforealignevent',
8 | ['antie/events/event'],
9 | function (Event) {
10 | 'use strict';
11 | /**
12 | * Class of events raised when a Mask is about to change alignment of its widget strip.
13 | * @name antie.events.BeforeAlignEvent
14 | * @class
15 | * @extends antie.events.Event
16 | * @param {antie.widgets.carousel.Mask} target The mask that is about to align the strip
17 | * @param {Integer} to the index into the strip of the index alignment is moving to
18 | * @param {Integer} from the index into the strip of the index alignment is moving from
19 | */
20 | return Event.extend(/** @lends antie.events.BeforeSelectedItemChangeEvent.prototype */ {
21 | /**
22 | * @constructor
23 | * @ignore
24 | */
25 | init: function init (target, alignedIndex) {
26 | this.target = target;
27 | this.alignedIndex = alignedIndex;
28 | init.base.call(this, 'beforealign');
29 | }
30 | });
31 | }
32 | );
33 |
--------------------------------------------------------------------------------
/static/script/events/beforeselecteditemchangeevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the before selected item change event
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/beforeselecteditemchangeevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when a {@link antie.widgets.List} has been scrolled to another item.
15 | * @name antie.events.BeforeSelectedItemChangeEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {antie.widgets.List} target The list that has changed.
19 | * @param {antie.widgets.Widget} item The list item that has been selected.
20 | * @param {Integer} index The inex of the list item that has been selected.
21 | */
22 | return Event.extend(/** @lends antie.events.BeforeSelectedItemChangeEvent.prototype */ {
23 | /**
24 | * @constructor
25 | * @ignore
26 | */
27 | init: function init (target, item, index) {
28 | this.target = target;
29 | this.item = item;
30 | this.index = index;
31 | init.base.call(this, 'beforeselecteditemchange');
32 | }
33 | });
34 | }
35 | );
36 |
--------------------------------------------------------------------------------
/static/script/events/blurevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.BlurEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/blurevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when focus is removed from a {@link antie.widgets.Button}.
15 | * @name antie.events.BlurEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {antie.widgets.Button} target The button which lost focus.
19 | */
20 | return Event.extend(/** @lends antie.events.BlurEvent.prototype */ {
21 | /**
22 | * @constructor
23 | * @ignore
24 | */
25 | init: function init (target) {
26 | this.target = target;
27 | init.base.call(this, 'blur');
28 | }
29 | });
30 | }
31 | );
32 |
--------------------------------------------------------------------------------
/static/script/events/componentevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.ComponentEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/componentevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when a {@link antie.widgets.Component} is being loaded/shown/hidden.
15 | * @name antie.events.ComponentEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {String} type The type of event.
19 | * @param {antie.widgets.ComponentContainer} container The container of the component that fired the event.
20 | * @param {antie.widgets.Component} component The component that fired the event.
21 | * @param {Object} args Any arguments that were passed into the component when loaded.
22 | * @param {Object} state Any state information that was stored on the component history stack for this component.
23 | * @param {Boolean} fromBack True if the event was raised as a result of the user navigating 'back' in the component history.
24 | */
25 | return Event.extend(/** @lends antie.events.ComponentEvent.prototype */ {
26 | /**
27 | * @constructor
28 | * @ignore
29 | */
30 | init: function init (type, container, component, args, state, fromBack) {
31 | this.container = container;
32 | this.component = component;
33 | this.args = args;
34 | this.state = state;
35 | this.fromBack = fromBack;
36 | init.base.call(this, type);
37 | }
38 | });
39 | }
40 | );
41 |
--------------------------------------------------------------------------------
/static/script/events/databoundevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.DataBoundEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/databoundevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised before and after databinding of a {@link antie.widgets.List}.
15 | * @name antie.events.DataBoundEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {String} type The type of the event.
19 | * @param {antie.widgets.List} target The list that has received data.
20 | * @param {antie.Iterator} iterator An iterator to the data that has been bound to the list.
21 | * @param {Object} error Error details (if applicable to the event type).
22 | */
23 | return Event.extend(/** @lends antie.events.DataBoundEvent.prototype */ {
24 | /**
25 | * @constructor
26 | * @ignore
27 | */
28 | init: function init (type, target, iterator, error) {
29 | this.target = target;
30 | this.iterator = iterator;
31 | this.error = error;
32 | init.base.call(this, type);
33 | }
34 | });
35 | }
36 | );
37 |
--------------------------------------------------------------------------------
/static/script/events/focusdelayevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.FocusDelayEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/focusdelayevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when focus is gained by a {@link antie.widgets.Button} and
15 | * has not been lost within an application-wide number of milliseconds.
16 | * @name antie.events.FocusDelayEvent
17 | * @class
18 | * @extends antie.events.Event
19 | * @param {antie.widgets.Button} target The button which gained focus.
20 | */
21 | return Event.extend(/** @lends antie.events.FocusDelayEvent.prototype */ {
22 | /**
23 | * @constructor
24 | * @ignore
25 | */
26 | init: function init (target) {
27 | this.target = target;
28 | init.base.call(this, 'focusdelay');
29 | }
30 | });
31 | }
32 | );
33 |
--------------------------------------------------------------------------------
/static/script/events/focusevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.FocusEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/focusevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when focus is gained by a {@link antie.widgets.Button}.
15 | * @name antie.events.FocusEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {antie.widgets.Button} target The button which gained focus.
19 | */
20 | return Event.extend(/** @lends antie.events.FocusEvent.prototype */ {
21 | /**
22 | * @constructor
23 | * @ignore
24 | */
25 | init: function init (target) {
26 | this.target = target;
27 | init.base.call(this, 'focus');
28 | }
29 | });
30 | }
31 | );
32 |
--------------------------------------------------------------------------------
/static/script/events/mediaerrorevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.MediaErrorEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/mediaerrorevent',
9 | ['antie/events/mediaevent'],
10 | function(MediaEvent) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when media errors occur
15 | * @name antie.events.MediaErrorEvent
16 | * @class
17 | * @extends antie.events.MediaEvent
18 | * @param {antie.widgets.Media} target The media widget that fired the event.
19 | * @param {String} code Error code.
20 | */
21 |
22 | var MediaErrorEvent = MediaEvent.extend(/** @lends antie.events.MediaErrorEvent.prototype */ {
23 | /**
24 | * @constructor
25 | * @ignore
26 | */
27 | init: function init (target, code) {
28 | this.code = code;
29 | init.base.call(this, 'error', target);
30 | }
31 | });
32 |
33 | return MediaErrorEvent;
34 | }
35 | );
36 |
--------------------------------------------------------------------------------
/static/script/events/mediasourceerrorevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.MediaSourceErrorEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/mediasourceerrorevent',
9 | ['antie/events/mediaerrorevent'],
10 | function(MediaErrorEvent) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when media error occur on a source
15 | * @name antie.events.MediaSourceErrorEvent
16 | * @class
17 | * @extends antie.events.MediaErrorEvent
18 | * @param {antie.widgets.Media} target The media widget that fired the event.
19 | * @param {Integer} code Error code.
20 | * @param {String} url URL of source which raised error.
21 | * @param {Boolean} last True if the source was the last source available.
22 | */
23 | var MediaSourceErrorEvent = MediaErrorEvent.extend(/** @lends antie.events.MediaSourceErrorEvent.prototype */ {
24 | /**
25 | * @constructor
26 | * @ignore
27 | */
28 | init: function init (target, code, url, last) {
29 | this.url = url;
30 | this.last = last;
31 |
32 | init.base.call(this, target, code);
33 | }
34 | });
35 |
36 | return MediaSourceErrorEvent;
37 | }
38 | );
39 |
--------------------------------------------------------------------------------
/static/script/events/networkstatuschangeevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.NetworkStatusChangeEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/networkstatuschangeevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when the network state of a device changes (e.g. it goes offline).
15 | * @name antie.events.NetworkStatusChangeEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {Integer} networkStatus The new network status.
19 | */
20 | var NetworkStatusChangeEvent = Event.extend(/** @lends antie.events.FocusEvent.prototype */ {
21 | /**
22 | * @constructor
23 | * @ignore
24 | */
25 | init: function init (networkStatus) {
26 | this.networkStatus = networkStatus;
27 | init.base.call(this, 'networkstatuschange');
28 | }
29 | });
30 |
31 | /**
32 | * Device is offline.
33 | * @memberOf antie.events.NetworkStatusChangeEvent
34 | * @name NETWORK_STATUS_OFFLINE
35 | * @constant
36 | * @static
37 | */
38 | NetworkStatusChangeEvent.NETWORK_STATUS_OFFLINE = 0;
39 |
40 | /**
41 | * Device is online.
42 | * @memberOf antie.events.NetworkStatusChangeEvent
43 | * @name NETWORK_STATUS_ONLINE
44 | * @constant
45 | * @static
46 | */
47 | NetworkStatusChangeEvent.NETWORK_STATUS_ONLINE = 1;
48 |
49 | return NetworkStatusChangeEvent;
50 | }
51 | );
52 |
--------------------------------------------------------------------------------
/static/script/events/pagechangeevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.PageChangeEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/pagechangeevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when the page has changed (for stat reporting)
15 | * @name antie.events.PageChangeEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {String} countername A name given to each web page that can be used for reporting.
19 | */
20 | return Event.extend(/** @lends antie.events.PageChangeEvent.prototype */ {
21 | /**
22 | * @constructor
23 | * @ignore
24 | */
25 | init: function init (countername, labels) {
26 | this.countername = countername;
27 | this.labels = labels;
28 | init.base.call(this, 'pagechange');
29 | if (window.log) {
30 | window.log('Page change:', countername, labels);
31 | }
32 | }
33 | });
34 | }
35 | );
36 |
--------------------------------------------------------------------------------
/static/script/events/selecteditemchangeevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.SelectedItemChangeEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/selecteditemchangeevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when a {@link antie.widgets.List} has been scrolled to another item.
15 | * @name antie.events.SelectedItemChangeEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {antie.widgets.List} target The list that has changed.
19 | * @param {antie.widgets.Widget} item The list item that has been selected.
20 | * @param {Integer} index The index of the list item that has been selected.
21 | */
22 | return Event.extend(/** @lends antie.events.SelectedItemChangeEvent.prototype */ {
23 | /**
24 | * @constructor
25 | * @ignore
26 | */
27 | init: function init (target, item, index) {
28 | this.target = target;
29 | this.item = item;
30 | this.index = index;
31 | init.base.call(this, 'selecteditemchange');
32 | }
33 | });
34 | }
35 | );
36 |
--------------------------------------------------------------------------------
/static/script/events/selectevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.SelectEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/selectevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when a {@link antie.widgets.Button} has been selected/activated/clicked by a user.
15 | * @name antie.events.SelectEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {antie.widgets.Button} target The button which has been selected/activated/clicked by the user;
19 | */
20 | return Event.extend(/** @lends antie.events.SelectEvent.prototype */ {
21 | /**
22 | * @constructor
23 | * @ignore
24 | */
25 | init: function init (target) {
26 | this.target = target;
27 | init.base.call(this, 'select');
28 | }
29 | });
30 | }
31 | );
32 |
--------------------------------------------------------------------------------
/static/script/events/sliderchangeevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.SliderChangeEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/sliderchangeevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when the value of {@link antie.widgets.Slider} has been changed.
15 | * @name antie.events.SliderChangeEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {String} type The event type.
19 | * @param {antie.widgets.Slider} target The slider that has changed.
20 | * @param {Integer} index The new value of the slider.
21 | */
22 | return Event.extend(/** @lends antie.events.SliderChangeEvent.prototype */ {
23 | /**
24 | * @constructor
25 | * @ignore
26 | */
27 | init: function init (type, target, value) {
28 | init.base.call(this, type);
29 | this.target = target;
30 | this.value = value;
31 | }
32 | });
33 | }
34 | );
35 |
--------------------------------------------------------------------------------
/static/script/events/textchangeevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.TextChangeEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/textchangeevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when text is changed by an onscreen keyboard
15 | * @name antie.events.TextChangeEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {antie.widgets.Keyboard} target The keyboard widget that changed text.
19 | * @param {String} text The new text entered by the keyboard.
20 | * @param {antie.widgets.Button} button The button selected on the keyboard which caused the text to change.
21 | * @param {Boolean} multitap true
if the text was changed due to a multi-tap press.
22 | * Note: You will receive a 2nd event when the multitap timeout finishes with multitap set to false
23 | */
24 | return Event.extend(/** @lends antie.events.TextChangeEvent.prototype */{
25 | /**
26 | * @constructor
27 | * @ignore
28 | */
29 | init: function init (target, text, button, multitap) {
30 | this.target = target;
31 | this.text = text;
32 | this.button = button;
33 | this.multitap = multitap;
34 |
35 | init.base.call(this, 'textchange');
36 | }
37 | });
38 | }
39 | );
40 |
--------------------------------------------------------------------------------
/static/script/events/textpagechangeevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.TextPageChangeEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/textpagechangeevent',
9 | ['antie/events/event'],
10 | function(Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Class of events raised when page is changed in a TextPager object
15 | * @name antie.events.TextPageChangeEvent
16 | * @class
17 | * @extends antie.events.Event
18 | * @param {antie.widgets.TextPager} target The TextPager widget that changed page.
19 | * @param {Number} page The new page number.
20 | */
21 | return Event.extend(/** @lends antie.events.TextPageChangeEvent.prototype */ {
22 | /**
23 | * @constructor
24 | * @ignore
25 | */
26 | init: function init (target, page) {
27 | this.target = target;
28 | this.page = page;
29 |
30 | init.base.call(this, 'textpagechange');
31 | }
32 | });
33 | }
34 | );
35 |
--------------------------------------------------------------------------------
/static/script/events/tunerpresentingevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.TunerPresentingEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/tunerpresentingevent',
9 | ['antie/events/event'],
10 | function (Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Indicates broadcast has started playing.
15 | * @class
16 | * @name antie.events.TunerPresentingEvent
17 | * @extends antie.events.Event
18 | * @param {String} channelName The channel name which is now playing.
19 | */
20 | return Event.extend(/** @lends antie.events.TunerPresentingEvent.prototype */ {
21 | /**
22 | * @constructor
23 | * @ignore
24 | */
25 | init: function init (channelName) {
26 | this.channel = channelName;
27 | init.base.call(this, 'tunerpresenting');
28 | }
29 | });
30 | }
31 | );
32 |
--------------------------------------------------------------------------------
/static/script/events/tunerstoppedevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.TunerStoppedEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/tunerstoppedevent',
9 | ['antie/events/event'],
10 | function (Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Indicates broadcast has stopped playing.
15 | * @class
16 | * @name antie.events.TunerStoppedEvent
17 | * @extends antie.events.Event
18 | */
19 | return Event.extend(/** @lends antie.events.Event.prototype */ {
20 | /**
21 | * @constructor
22 | * @ignore
23 | */
24 | init: function init () {
25 | init.base.call(this, 'tunerstopped');
26 | }
27 | });
28 | }
29 | );
30 |
--------------------------------------------------------------------------------
/static/script/events/tunerunavailableevent.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.events.TunerUnavailableEvent class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/events/tunerunavailableevent',
9 | ['antie/events/event'],
10 | function (Event) {
11 | 'use strict';
12 |
13 | /**
14 | * Indicates broadcast has been interrupted, for example because the broadcast signal has stopped. (e.g. the
15 | * antenna has been removed from the device.)
16 | * @class
17 | * @name antie.events.TunerUnavailableEvent
18 | * @extends antie.events.Event
19 | */
20 | return Event.extend(/** @lends antie.events.Event.prototype */ {
21 | /**
22 | * @constructor
23 | * @ignore
24 | */
25 | init: function init () {
26 | init.base.call(this, 'tunerunavailable');
27 | }
28 | });
29 | }
30 | );
31 |
--------------------------------------------------------------------------------
/static/script/formatter.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing base antie.Formatter class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/formatter',
9 | [
10 | 'antie/class'
11 | ],
12 | function(Class) {
13 | 'use strict';
14 |
15 | /**
16 | * Base formatter. Takes an iterator to a data source and returns a widget tree to represent one or more items of data.
17 | * @name antie.Formatter
18 | * @class
19 | * @abstract
20 | * @extends antie.Class
21 | * @requires antie.Iterator
22 | */
23 | return Class.extend(/** @lends antie.Formatter.prototype */ {
24 | /**
25 | * @constructor
26 | * @ignore
27 | */
28 | init: function init (opts) {
29 | if (opts) {
30 | this._opts = opts;
31 | }
32 | },
33 | /**
34 | * Formats data from the iterator.
35 | * @param {antie.Iterator} iterator An iterator pointing to the data to be formatted.
36 | * @returns A antie.widgets.Widget object representing one or more data items from the iterator.
37 | */
38 | format: function format (/*iterator*/) {
39 | throw new Error('Not implemented (Formatter::format). A formatter class does not implement its format method.');
40 | }
41 | });
42 | }
43 | );
44 |
--------------------------------------------------------------------------------
/static/script/lib/date.parse.js:
--------------------------------------------------------------------------------
1 | define('antie/lib/date.parse', function() {
2 |
3 | /**
4 | * Date.parse with progressive enhancement for ISO-8601
5 | * © 2010 Colin Snover MediaType.MEDIA_TYPE_VIDEO
.
24 | * @returns The media type of this content.
25 | */
26 | getMediaType: function getMediaType () {
27 | return MediaSource.MEDIA_TYPE_VIDEO;
28 | }
29 | });
30 |
31 | return VideoSource;
32 | });
33 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/binders/batchbinder.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.binders.batchbinder class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/widgets/carousel/binders/batchbinder',
9 | [
10 | 'antie/widgets/carousel/binder'
11 | ],
12 | function (Binder) {
13 | 'use strict';
14 | /**
15 | * Allows binding in batches with calculation disabled until after final bind
16 | * @name antie.widgets.carousel.binders.BatchBinder
17 | * @class
18 | * @extends antie.widgets.carousel.Binder
19 | */
20 | return Binder.extend(/** @lends antie.widgets.carousel.BatchBinder.prototype */ {
21 | /**
22 | * Creates new widgets which are then appended to
23 | * the widget supplied. Continues until the end of the data returned
24 | * by the source is reached.
25 | * @param widget The parent of the widgets to be created.
26 | */
27 | appendAllTo: function appendAllTo (widget) {
28 | this._bindAll(
29 | widget,
30 | this._appendItem,
31 | this._disableAutoCalc,
32 | this._enableAutoCalc
33 | );
34 | },
35 |
36 | _disableAutoCalc: function _disableAutoCalc (ev) {
37 | ev.target.autoCalculate(false);
38 | },
39 |
40 | _enableAutoCalc: function _enableAutoCalc (ev) {
41 | ev.target.autoCalculate(true);
42 | ev.target.recalculate();
43 | }
44 | });
45 | }
46 | );
47 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/keyhandlers/activatefirsthandler.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.keyhandlers.activatefirsthandler class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/widgets/carousel/keyhandlers/activatefirsthandler',
9 | [
10 | 'antie/widgets/carousel/keyhandlers/keyhandler'
11 | ],
12 | /**
13 | * The base ActivateFirstHandler class moves alignment in the same way as the base Keyhandler class
14 | * Before alignment is started, the active widget is changed to the next focusable widget.
15 | * @name antie.widgets.carousel.keyhandlers.ActivateFirstHandler
16 | * @class
17 | * @extends antie.widgets.carousel.keyhandlers.KeyHandler
18 | */
19 | function (KeyHandler) {
20 | 'use strict';
21 | return KeyHandler.extend(/** @lends antie.widgets.carousel.keyhandlers.AlignFirstHandler.prototype */{
22 | _addAlignmentListeners: function _addAlignmentListeners () {
23 | var carousel = this._carousel;
24 | carousel.addEventListener('beforealign', function (ev) {
25 | if (ev.target === carousel) {
26 | carousel.setActiveIndex(ev.alignedIndex);
27 | }
28 | });
29 | }
30 | });
31 | }
32 | );
33 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/keyhandlers/alignfirsthandler.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.keyhandlers.alignfirsthandler class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/widgets/carousel/keyhandlers/alignfirsthandler',
9 | [
10 | 'antie/widgets/carousel/keyhandlers/keyhandler'
11 | ],
12 | /**
13 | * The base AlignFirstHandler class moves alignment in the same way as the base Keyhandler class
14 | * After alignment is completed, the active widget is changed to the next focusable widget.
15 | * @name antie.widgets.carousel.keyhandlers.AlignFirstHandler
16 | * @class
17 | * @extends antie.widgets.carousel.keyhandlers.KeyHandler
18 | */
19 | function (KeyHandler) {
20 | 'use strict';
21 | return KeyHandler.extend(/** @lends antie.widgets.carousel.keyhandlers.AlignFirstHandler.prototype */{
22 | _addAlignmentListeners: function _addAlignmentListeners () {
23 | var carousel = this._carousel;
24 | carousel.addEventListener('afteralign', function (ev) {
25 | if (ev.target === carousel) {
26 | carousel.setActiveIndex(ev.alignedIndex);
27 | }
28 | });
29 | }
30 | });
31 | }
32 | );
33 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/orientations/horizontal.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.orientations.horizontal class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/widgets/carousel/orientations/horizontal',
9 | [
10 | 'antie/class',
11 | 'antie/events/keyevent'
12 | ],
13 | /**
14 | * Class to encapsulate any data specific to a horizontal orientation
15 | * @name antie.widgets.carousel.orientations.Horizontal
16 | * @extends antie.Class
17 | * @class
18 | */
19 | function (Class, KeyEvent) {
20 | 'use strict';
21 | var Horizontal = Class.extend(/** @lends antie.widgets.carousel.orientations.Horizontal.prototype */ {
22 | dimension: function dimension () {
23 | return 'width';
24 | },
25 | edge: function edge () {
26 | return 'left';
27 | },
28 | styleClass: function styleClass () {
29 | return 'horizontal';
30 | },
31 | defaultKeys: function defaultKeys () {
32 | return {
33 | PREVIOUS: KeyEvent.VK_LEFT,
34 | NEXT: KeyEvent.VK_RIGHT
35 | };
36 | }
37 | });
38 |
39 | return new Horizontal();
40 | }
41 | );
42 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/orientations/vertical.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.orientations.vertical class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/widgets/carousel/orientations/vertical',
9 | [
10 | 'antie/class',
11 | 'antie/events/keyevent'
12 | ],
13 | /**
14 | * Class to encapsulate any data specific to a vertical orientation
15 | * @name antie.widgets.carousel.orientations.Vertical
16 | * @extends antie.Class
17 | * @class
18 | */
19 | function (Class, KeyEvent) {
20 | 'use strict';
21 | var Vertical = Class.extend(/** @lends antie.widgets.carousel.orientations.Vertical.prototype */{
22 | dimension: function dimension () {
23 | return 'height';
24 | },
25 | edge: function edge () {
26 | return 'top';
27 | },
28 | styleClass: function styleClass () {
29 | return 'vertical';
30 | },
31 | defaultKeys: function defaultKeys () {
32 | return {
33 | PREVIOUS: KeyEvent.VK_UP,
34 | NEXT: KeyEvent.VK_DOWN
35 | };
36 | }
37 | });
38 |
39 | return new Vertical();
40 | }
41 | );
42 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/strips/hidingstrip.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.strips.hidingstrip class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define('antie/widgets/carousel/strips/hidingstrip',
8 | [
9 | 'antie/widgets/carousel/strips/cullingstrip',
10 | 'antie/widgets/carousel/strips/utility/widgetcontext',
11 | 'antie/widgets/carousel/strips/utility/visibilitystates'
12 | ],
13 | function (CullingStrip, WidgetContext, VISIBILITY_STATES) {
14 | 'use strict';
15 | var HidingStrip;
16 | /**
17 | * A container for the widgets displayed within a carousel, in which widgets are only created when they
18 | * come into view, and that sets widgets to visibility: hidden and opacity: 0 when they go out of view
19 | * @name antie.widgets.carousel.strips.HidingStrip
20 | * @class
21 | * @extends antie.widgets.carousel.strips.CullingStrip
22 | * @param {String} id The unique ID of the widget.
23 | * @param {Object} orientation an object representing the strip's orientation.
24 | * One of antie.widgets.carousel.orientations.Horizontal or antie.widgets.carousel.orientations.Vertical
25 | */
26 | HidingStrip = CullingStrip.extend(/** @lends antie.widgets.carousel.strips.HidingStrip.prototype */{
27 | createContext: function createContext (widget, parent) {
28 | return new WidgetContext(widget, parent, VISIBILITY_STATES);
29 | }
30 | });
31 | return HidingStrip;
32 | }
33 | );
34 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/strips/utility/attachedstate.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.strips.utility.attachedstate class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/widgets/carousel/strips/utility/attachedstate',
9 | [
10 | 'antie/widgets/carousel/strips/utility/state'
11 | ],
12 | function (State) {
13 | 'use strict';
14 | var AttachedState;
15 | AttachedState = State.extend({
16 | init: function init () {
17 |
18 | },
19 |
20 | append: function append (/*context, parent, widget*/) {
21 |
22 | },
23 |
24 | prepend: function prepend (/*context, parent, widget*/) {
25 |
26 | },
27 |
28 | detach: function detach (context, widget) {
29 | var device = this._getDevice(widget);
30 | device.removeElement(widget.outputElement);
31 | context.setState('RENDERED');
32 | },
33 |
34 | hasLength: function hasLength () {
35 | return true;
36 | },
37 |
38 | inView: function inView () {
39 | return true;
40 | },
41 |
42 | _getDevice: function _getDevice (widget) {
43 | return widget.getCurrentApplication().getDevice(widget);
44 | }
45 | });
46 | return AttachedState;
47 | }
48 | );
49 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/strips/utility/hiddenstate.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.strips.utility.hiddenstate class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/widgets/carousel/strips/utility/hiddenstate',
9 | [
10 | 'antie/widgets/carousel/strips/utility/state'
11 | ],
12 | function (State) {
13 | 'use strict';
14 | var RenderedState;
15 | RenderedState = State.extend({
16 | init: function init () {
17 |
18 | },
19 |
20 | append: function append (context, parent, widget) {
21 | this._show(context, widget);
22 | },
23 |
24 | prepend: function prepend (context, parent, widget) {
25 | this._show(context, widget);
26 | },
27 |
28 | detach: function detach (/*context, widget*/) {
29 |
30 | },
31 |
32 | hasLength: function hasLength () {
33 | return true;
34 | },
35 |
36 | inView: function inView () {
37 | return false;
38 | },
39 |
40 | _getDevice: function _getDevice (widget) {
41 | return widget.getCurrentApplication().getDevice();
42 | },
43 |
44 | _show: function _show (context, widget) {
45 | widget.getCurrentApplication().getDevice().showElement({el: widget.outputElement, skipAnim: true});
46 | context.setState('ATTACHED');
47 | }
48 | });
49 | return RenderedState;
50 | }
51 | );
52 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/strips/utility/initstate.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.strips.utility.initstate class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/widgets/carousel/strips/utility/initstate',
9 | [
10 | 'antie/widgets/carousel/strips/utility/state'
11 | ],
12 | function (State) {
13 | 'use strict';
14 | var InitState;
15 | InitState = State.extend({
16 | init: function init () {
17 | },
18 |
19 | append: function append (context, parent, widget) {
20 | this._render(widget);
21 | this._attach(context, parent, widget, 'appendChildElement');
22 | },
23 |
24 | prepend: function prepend (context, parent, widget) {
25 | this._render(widget);
26 | this._attach(context, parent, widget, 'prependChildElement');
27 | },
28 |
29 | detach: function detach (/*context, widget*/) {
30 | },
31 |
32 | hasLength: function hasLength () {
33 | return false;
34 | },
35 |
36 | inView: function inView () {
37 | return false;
38 | },
39 |
40 | _getDevice: function _getDevice (widget) {
41 | return widget.getCurrentApplication().getDevice();
42 | },
43 |
44 | _render: function _render (widget) {
45 | var device = this._getDevice(widget);
46 | widget.render(device);
47 | },
48 |
49 | _attach: function _attach (context, parent, widget, attachMethodName) {
50 | var device = this._getDevice(widget);
51 | device[attachMethodName](parent.outputElement, widget.outputElement);
52 | context.setState('ATTACHED');
53 | }
54 | });
55 |
56 | return InitState;
57 | }
58 | );
59 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/strips/utility/renderedstate.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.strips.utility.renderstate class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define('antie/widgets/carousel/strips/utility/renderedstate',
8 | [
9 | 'antie/widgets/carousel/strips/utility/state'
10 | ],
11 | function (State) {
12 | 'use strict';
13 | var RenderedState;
14 | RenderedState = State.extend({
15 | init: function init () {
16 |
17 | },
18 |
19 | append: function append (context, parent, widget) {
20 | this._attach(context, parent, widget, 'appendChildElement');
21 | },
22 |
23 | prepend: function prepend (context, parent, widget) {
24 | this._attach(context, parent, widget, 'prependChildElement');
25 | },
26 |
27 | detach: function detach (/*context, widget*/) {
28 |
29 | },
30 |
31 | hasLength: function hasLength () {
32 | return false;
33 | },
34 |
35 | inView: function inView () {
36 | return false;
37 | },
38 |
39 | _getDevice: function _getDevice (widget) {
40 | return widget.getCurrentApplication().getDevice();
41 | },
42 |
43 | _attach: function _attach (context, parent, widget, attachMethodName) {
44 | var device = this._getDevice(widget);
45 | device[attachMethodName](parent.outputElement, widget.outputElement);
46 | context.setState('ATTACHED');
47 | }
48 | });
49 | return RenderedState;
50 | }
51 | );
52 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/strips/utility/state.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.strips.utility.state class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/widgets/carousel/strips/utility/state',
9 | [
10 | 'antie/class'
11 | ],
12 | function (Class) {
13 | 'use strict';
14 | var State;
15 | State = Class.extend({
16 | init: function init () {
17 | // implement in child
18 | },
19 |
20 | append: function append (/*context, parent, widget*/) {
21 | // implement in child
22 | },
23 |
24 | prepend: function prepend (/*context, parent, widget*/) {
25 | // implement in child
26 | },
27 |
28 | detach: function detach (/*context, widget*/) {
29 | // implement in child
30 | },
31 |
32 | hasLength: function hasLength () {
33 | // implement in child
34 | },
35 |
36 | inView: function inView () {
37 | // implement in child
38 | }
39 | });
40 | return State;
41 | }
42 | );
43 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/strips/utility/states.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.strips.utility.states class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define('antie/widgets/carousel/strips/utility/states',
8 | [
9 | 'antie/widgets/carousel/strips/utility/initstate',
10 | 'antie/widgets/carousel/strips/utility/renderedstate',
11 | 'antie/widgets/carousel/strips/utility/attachedstate'
12 | ],
13 | function (InitState, RenderedState, AttachedState) {
14 | 'use strict';
15 | return {
16 | INIT: InitState,
17 | RENDERED: RenderedState,
18 | ATTACHED: AttachedState
19 | };
20 | }
21 | );
22 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/strips/utility/visibilitystates.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.strips.utility.visibilitystates class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define('antie/widgets/carousel/strips/utility/visibilitystates',
8 | [
9 | 'antie/widgets/carousel/strips/utility/initstate',
10 | 'antie/widgets/carousel/strips/utility/hiddenstate',
11 | 'antie/widgets/carousel/strips/utility/visiblestate'
12 | ],
13 | function (InitState, HiddenState, VisibleState) {
14 | 'use strict';
15 | return {
16 | INIT: InitState,
17 | HIDDEN: HiddenState,
18 | ATTACHED: VisibleState
19 | };
20 | }
21 | );
22 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/strips/utility/visiblestate.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.strips.utility.visiblestate class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/widgets/carousel/strips/utility/visiblestate',
9 | [
10 | 'antie/widgets/carousel/strips/utility/state'
11 | ],
12 | function (State) {
13 | 'use strict';
14 | var VisibleState;
15 | VisibleState = State.extend({
16 | init: function init () {
17 |
18 | },
19 |
20 | append: function append (/*context, parent, widget*/) {
21 |
22 | },
23 |
24 | prepend: function prepend (/*context, parent, widget*/) {
25 |
26 | },
27 |
28 | detach: function detach (context, widget) {
29 | var device = this._getDevice(widget);
30 | device.hideElement({el: widget.outputElement, skipAnim: true});
31 | context.setState('HIDDEN');
32 | },
33 |
34 | hasLength: function hasLength () {
35 | return true;
36 | },
37 |
38 | inView: function inView () {
39 | return true;
40 | },
41 |
42 | _getDevice: function _getDevice (widget) {
43 | return widget.getCurrentApplication().getDevice(widget);
44 | }
45 | });
46 | return VisibleState;
47 | }
48 | );
49 |
--------------------------------------------------------------------------------
/static/script/widgets/carousel/strips/utility/widgetcontext.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.carousel.strips.utility.widgetcontext class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define('antie/widgets/carousel/strips/utility/widgetcontext',
8 | [
9 | 'antie/class'
10 | ],
11 | function (Class) {
12 | 'use strict';
13 | var WidgetContext;
14 | WidgetContext = Class.extend({
15 | init: function init (widget, parent, STATES) {
16 | this._widget = widget;
17 | this._parent = parent;
18 | this.STATES = STATES;
19 | this._state = new this.STATES.INIT(this);
20 | },
21 |
22 | /**
23 | * Appends output element to parent if not already child
24 | */
25 | append: function append () {
26 | this._state.append(this, this._parent, this._widget);
27 | },
28 |
29 | /**
30 | * Prepends output element to parent if not already child
31 | */
32 | prepend: function prepend () {
33 | this._state.prepend(this, this._parent, this._widget);
34 | },
35 |
36 | /**
37 | * Element no longer needs to be visible (e.g. remove from DOM)
38 | */
39 | detach: function detach () {
40 | this._state.detach(this, this._widget);
41 | },
42 |
43 | /**
44 | * @returns {Boolean} true if widget currently takes up space in its parent, false otherwise
45 | * e.g. would return true if rendered, in the document and without display: none set
46 | * would return false if not rendered, not in the DOM or with display: none set
47 | */
48 | hasLength: function hasLength () {
49 | return this._state.hasLength();
50 | },
51 |
52 | inView: function inView () {
53 | return this._state.inView();
54 | },
55 |
56 | setState: function setState (stateName) {
57 | this._state = new this.STATES[stateName](this);
58 | }
59 | });
60 |
61 | return WidgetContext;
62 | }
63 | );
64 |
--------------------------------------------------------------------------------
/static/script/widgets/listitem.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileOverview Requirejs module containing the antie.widgets.ListItem class.
3 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
4 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
5 | */
6 |
7 | define(
8 | 'antie/widgets/listitem',
9 | ['antie/widgets/container'],
10 | function(Container) {
11 | 'use strict';
12 |
13 | /**
14 | * The ListItem widget is a container widget that is used by the {@link antie.widgets.List} widget when set to List.RENDER_MODE_LIST
.
15 | * If you wish to control the classNames and id of list items, you can manually create them in your component/formatter and append them to the list.
16 | * Otherwise, they will be automatically generated and will wrap other widgets you add to any {@link antie.widgets.List} widget when set to List.RENDER_MODE_LIST
.
17 | * @name antie.widgets.ListItem
18 | * @class
19 | * @private
20 | * @extends antie.widgets.Container
21 | * @param {String} [id] The unique ID of the widget. If excluded, a temporary internal ID will be used (but not included in any output).
22 | */
23 | return Container.extend(/** @lends antie.widgets.ListItem.prototype */ {
24 | /**
25 | * @constructor
26 | * @ignore
27 | */
28 | init: function init (id) {
29 | init.base.call(this, id);
30 | this.addClass('listitem');
31 | },
32 | /**
33 | * Renders the widget and any child widgets to device-specific output using the {@link antie.devices.Device#createListItem} method.
34 | * @param {antie.devices.Device} device The device to render to.
35 | * @returns A device-specific object that represents the widget as displayed on the device (in a browser, a DOMElement);
36 | */
37 | render: function render (device) {
38 | if(!this.outputElement) {
39 | this.outputElement = device.createListItem(this.id, this.getClasses());
40 | }
41 | return render.base.call(this, device);
42 | }
43 | });
44 | }
45 | );
46 |
--------------------------------------------------------------------------------
/static/script/widgets/state_view_container.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @preserve Copyright (c) 2013-present British Broadcasting Corporation. All rights reserved.
3 | * @license See https://github.com/bbc/tal/blob/master/LICENSE for full licence
4 | */
5 |
6 | define (
7 | 'antie/widgets/state_view_container',
8 | [
9 | 'antie/widgets/container',
10 | 'antie/events/keyevent',
11 | 'antie/widgets/button'
12 | ], function(Container, KeyEvent, Button){
13 | 'use strict';
14 |
15 | var keyMapping = { };
16 | keyMapping[KeyEvent.VK_UP] = 'up';
17 | keyMapping[KeyEvent.VK_DOWN] = 'down';
18 | keyMapping[KeyEvent.VK_LEFT] = 'left';
19 | keyMapping[KeyEvent.VK_RIGHT] = 'right';
20 | keyMapping[KeyEvent.VK_BACK] = 'back';
21 |
22 | var StateViewContainer = Container.extend( {
23 |
24 | init: function init (controller) {
25 | init.base.call(this);
26 |
27 | var self = this;
28 |
29 |
30 | this.focusButtonHack = new Button();
31 | this.appendChildWidget(this.focusButtonHack);
32 |
33 | this.addEventListener('select', function() {
34 | controller.select();
35 | });
36 |
37 | this.addEventListener('keydown', function(evt){
38 | var mappedFunctionName = keyMapping[evt.keyCode];
39 | if (mappedFunctionName){
40 | controller[mappedFunctionName]();
41 | }
42 | });
43 |
44 |
45 | this.addEventListener('afterhide', function() {
46 | self.focusHack();
47 | });
48 |
49 |
50 | this.addEventListener('beforeshow', function(evt) {
51 | self.getCurrentApplication().setActiveComponent(evt.component.id);
52 | });
53 |
54 | },
55 | focusHack: function focusHack () {
56 | this._isFocussed = true;
57 | this.focusButtonHack.focus();
58 | }
59 | } );
60 |
61 | return StateViewContainer;
62 |
63 | });
64 |
--------------------------------------------------------------------------------