Git Product home page Git Product logo

tal's Introduction

TAL -- TV Application Layer

TAL

maintenance-status No Maintenance Intended

Build Status npm version


TAL Replacement update 28/09/2023

We are working towards an approach of modular packages focused on specific features such as playback, navigation, and device abstraction. We do not intend to provide a UI framework, and these packages should work with a number of front-end frameworks. As part of this work, we are in the process of making internal TV packages open source. Some of these have been released already including:

Looking further to the future, we are developing an open source demo app, including associated documentation. This will enable the wider community to understand how these packages work together to build a TV application.

Contact us at BBC TV Open Source 20/03/2023

We have now created a mailbox where you can contact us with any questions related to TAL or the future of this project. We aim to respond to emails within a week. We hope to share some details of the replacement to TAL soon.

Deprecation Announcement 12/12/2022

Today we are announcing the deprecation of TAL. This will allow us to concentrate on future work, which we hope to share details of soon.

We apologise that we were not active in keeping the TAL community up to date with the status of the project. Going forward, we will provide regular updates on the future of TAL.

As part of the deprecation, pull requests will be disabled and outstanding issues will be closed. TAL will not be actively maintained.

We will answer any questions found in the issues backlog as best we can. There will soon be a email address you can use to contact us. This readme will be updated when this becomes available.


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.

There are hundreds of different devices in the marketplace and they all use slightly different technologies to achieve the same result. The purpose of TAL is to allow you to write an application once, and be confident that it can be deployed to all HTML-based TV devices.

View the latest release here.

Documentation

All our documentation is hosted on GitHub pages. Take a look at our faq for some high-level information, or dive straight into our javascript documentation for our code reference docs.

We also have a sample application that you can use as a guide to help you build your own applications.

License

TAL is available to everyone under the terms of the Apache 2.0 open source licence. Take a look at the LICENSE file in the code, and read our faq and documentation to learn how to contribute.

Testing

For developers who want to modify and contribute to TAL, we have a page on testing which you should follow before starting development.

Releasing (FOR MAINTAINERS)

See https://confluence.dev.bbc.co.uk/display/tvpjsfrmwk/TAL+Deployment+Process+for+Cosmos.

tal's People

Contributors

acarlson0000 avatar alexchesters avatar andrewjackson001 avatar cheunr02 avatar davidbuckhurst avatar dhurrell avatar drrobharper avatar dtyszka avatar ianarundale avatar jcobbctv avatar jmalk avatar johnbeech avatar johnbogart avatar jonpbbc avatar kevrmitchell avatar kukulaka avatar landeiro avatar laskop04 avatar lewisgoodwin avatar mackstar avatar povilas0 avatar rosswilson avatar rsjbailey avatar rthompson1991 avatar ryanwaudby avatar sdclibbery avatar shiningtrapez avatar subsidel avatar tsadler1988 avatar yameen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tal's Issues

Horizontal Progress Bar

Hello,

I am trying to add the horizontalprogress widget for the video playback. I couldn't succeed yet. I have the following questions. I am relatively new to web development.

  1. Do you have any sample code which demonstrate the usage of horizontalProgressbar?.
  2. Do we need to add css styling for the xxx_left and xxx_inner elements of the horizontalprogress bar?. (I tried adding this) If yes, how?
  3. The issue is I see the progress bar UI element only if I add the label to it. I don't see any movement of the progress bar inner element. I used setInterval to invoke function which updates the progress bar via setValue in every second. The value used for setValue is 0.05, 0.1, 0,15 etc.
  4. The testing is done in PC using chrome and firefox with default configuration. Tried with styletopleft and css3 animations.

Any help is really appreciated.

HorizontalCarousel widget adds multiple viewport padding elements when used with ComponentContainer.pushComponent()

HorizontalCarousel will add multiple view port padding elements to a carousel when using in a Component that will have other components pushed onto it, ComponentContainer.pushComponent(), and then removed, ComponentContainer.back(). Viewport padding elements are added when the the carousel becomes visible again by calling back.

The result will be the carousel output element contains multiple lines of

<div id="progListCarouselPaddingLeft" class="viewportPadding viewportPaddingLeft" style="width: 99999px;"></div>

<div id="progListCarouselPaddingRight" class="viewportPadding viewportPaddingRight" style="width: 99999px;"></div>

hc_viewport_bug

I suspect that there should only be a single element for left and right padding.

It looks like the elements are being added in HorizontalCarousel._onDataBound() without checking if the elements already exit.

Contributing to TAL

Hello,

I have been using TAL for writing media play back applications for Smart TVs like Samsung and LG. The main aim of the applications was to play back adaptive streaming content like MPEG-DASH, HLS and Smooth streams with or with out Play ready DRMs.

As part of this activity, I have extended BBC TAL to support the play back of adaptive streams and Play Ready DRM. This was tested in LG and Samsung Smart TVs and found to be working fine.

Now I would like to contribute these changes back to BBC TAL frame work. I have completed the testing as mentioned here. http://fmtvp.github.io/tal/testing.html

Please let me know how to proceed.

Navigation keys problem

In static/script/devices/browserdevice.js, onkeydown handler propagates the keydown event only the first time a certain key is pressed, then it propagates keypress events.
static/script/widgets/button.js does not register a listener for keypress events, resulting in the impossibility to navigate after the first movement.
I saw this problem using talexample.

Css3 / v2 carousel animation cancellation not working correctly on Opera

A V2 carousel, when used with an opera based device in CSS3 mode, does not cancel alignments properly - they continue to the end, so several queue up.
I had a quick look at this, it may be to do with the fact that when you set the vendor prefixed -o-transitiondelay (or whatever), opera adds the generic non prefixed property to the style string in addition to the oTransitionDelay property on the style object.
When you clear the prefixed style, it removes oTransitionDelay but not the generic string. Not sure if this is relevent or not but it looked a bit odd when I was stepping through.
May be specifically to do with the chaining of alignments in the carousel instead, would need to test device.stopAnimation() independently on Opera first to see if it's a generic problem or not.
I remember the cancellation behaviour on Opera was different to Chrome when returning to the initial value (opera reversed the animation as per spec whereas chrome didn't) but I think that cancelling by setting the duration to 0 used to work on everything.

RequireJS Optimizer

Hey,
I have a case where I need to deliver to one Device and keep Server requests low.
Tried to use r.js on appui/sampleapp.js, but it won't go through the other defined dependencies.

Do you have any experience with concating the required Modules into one File ?

Safe CORS configuration [TVPJSFRMWK-1997]

Hello,

although there is a supportsCORS device configuration option, none of the actual configurations contain a cors-enable setting.

Have you some certified configuration with CORS enabled? Are you aware of any TV with CORS enabled?

Thanks :-)

Calling ShowComponent can result in a crash

  • Trying to show the currently displayed component can results in a crash - this could be used as a useful way to reload the view itself
  • Devs are likely to try and use this approach

Other info:-
Shouldn't crash
Consider rename
Should return silently

Add the Application Show HbbTV line to the HbbTV Page Strategy

GIVEN a device uses the HbbTV Strategy
WHEN a TAL based App is launched over broadcast
THEN the Application Show HbbTV line should be executed

This should result in devices that follow the spec exactly launching correctly.
Q. What would happen to a device that doesn't follow spec exactly? Would it ignore it or would it break?

Browser Detection for HBBTV Red Dot ?

Hi!
Thanks for providing this great framework. I'm evaluating it for building a HBBTV Red Dot Application.

The Documentation says that device detection is out of the scope of the Framework. Do you have any recommendations for detection libraries ?

It enough to set the device to "default-hbbtv" to support (almost) all HBBTV-Capable devices ?

Do i need to perform device detection for a HBBTV Red Dot Application ?

Because there are a lot of devices out there and it is impossible to buy and test them all i was hoping this framework would help me to make sure the app is compatible to most/all of them.

CeHTML player non working correctly on samsung 2011 devices

Hello,

At France Televisions, we are benchmarking the BBC TAL Framework to see wether we can adopt this promising project for our HBBTV products or not.

I am in charge of this proof of concept.

The first step of my work is to get an application that could play a MP4 video on all the TVs we have in our showroom (almost every models, from year 2011 to 2014).

While I easily succeded to develop a simple app to play a video on all of our TVs, based on your SimpleVideoComponent.js demo, there still remains an issue on Samsung 2011, that all my investigations was unable to fix.

I tryed with another stream by changing the url at simplevideocomponent.js:94, but it doesn't work. I also tryed to simplify all the process of displaying the video in your framework to imitate the way we do it here at FTV, but it seems that there is a side effect somewhere in TAL.

Of course, I edited the device config file to set this modifier : "antie/devices/media/cehtml"

The stream this demo have to use is the following (official meteo TV) : http://we.tl/lWWVbMu7sX

Samsung 2011 keeps displaying "Unsupported Object".

The issue doesn't come from the TV because it is able to play MP4 videos on all of our normal HBBTV apps.

I would like to ask you how did you manage to make this TV work ?

Without this first step passed , FTV can not continue on benchmarking TAL. The FTV strategy is to support all the samsung TVs from 2011.

Thanks a lot.

photo 1

photo 2

Example of working script on this model of tv.
Please note that the stream url is only available for france.

<!DOCTYPE html PUBLIC "-//HbbTV//1.1.1//EN" "http://www.hbbtv.org/dtd/HbbTV-1.1.1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>France TV Météo</title>
</head>
<body style="background: #000;">
    <object id="appmgr" type="application/oipfApplicationManager" style="width: 0px; height: 0px; display: none;"></object>
    <object id="broadcastVideoObject" type="video/broadcast" style="position: absolute; display: none;"></object>
<script type="text/javascript" language="javascript">
//<![CDATA[
window.onload = function () {
        oipfcfg = document.createElement("object");
        oipfcfg.style.display = 'none';
        oipfcfg.setAttribute('id', "oipfcfg");
        oipfcfg.setAttribute('type', "application/application/oipfConfiguration");
        window.document.body.appendChild(oipfcfg);
        var appMgr = document.getElementById('appmgr');
        if (appMgr && appMgr.getOwnerApplication) {
                var app = appMgr.getOwnerApplication(window.document);
                app.show();
                app.privateData.keyset.setValue(0x33F);
                app.privateData.keyset.value = 0x330;
            }
        var video = document.createElement("object");
        video.setAttribute('id', "video");
        video.setAttribute('type', "video/mp4");
        video.setAttribute('allowScriptAcess', "always");
        video.width = 480;
        video.height = 270;
        window.document.body.appendChild(video);
        video.data = 'http://medias2.francetv.fr/hbbtv/replay/streaming-adaptatif/2014/S14/J1/99507438-20140331-934k.mp4';
        if (typeof (video.play) == 'function') video.play(1);
    }
//]]>
</script>
</body>
</html>

Carousel does not override getIndexOfChildWidget()

getIndexOfChildWidget() should pass through to the widget strip but it currently acts on the carousel's outer container. This means you'll always get a -1 return unless you pass in the carousel's mask widget (all carousel items will return -1)

Testing on Smart TV Alliance SDK

I run the Smart TV Alliance SDK (Emulator in a virtual machine), and ran into a problem: To activate remote debugging (via Opera firefly on the host), I have to press left CTRL+F1 in the emulator browser. In the TAL example, it doesn't trigger the remote debugging connection, so I assume somewhere the event propagation fails. Would be nice if this worked by default.

Performance issue when loading stylesheets

The loading of each stylesheet adds a minimum of 200ms to the page load time.

This is done in browserdevice.js loadStyleSheet (line 197):
...
var interval = window.setInterval(function() {
try {
style.sheet.cssRules;
window.clearInterval(interval);
} catch(ex) {
return;
}
callback(url);
}, 200);

This seems to be polling until an exception is not thrown when accessing style.sheet.cssRules - presumably this is an indicator that it's finished doing what it's doing.

However, as you can see from the code it waits 200ms before doing this check, so this code is potentially unnecessarily adding up to 200ms to the load time of the app per CSS file loaded. The code could be more efficiently rewritten as:
...
function checkIfLoaded() {
try {
style.sheet.cssRules;
// If the above line doesn't thrown an exception, then it's loaded, so do the callback
callback(url);
} catch(ex) {
// Looks like it hasn't loaded - check again in 20ms
window.setTimeout(checkIfLoaded, 20);
}
}

                checkIfLoaded();

However it would need some investigation to see if this is a viable approach or whether the was a good reason for it being done the way it's done.

Allow access to the logger in a easier way

  • Override console.log() rather than developer needing to do this.getCurrentApplication().getDevice().getLogger().log()

Do this by Intercepting console.log calls and doing an ANTIE log as define in config

On Device Testing

Tests should be able to run on Connected TV devices.
Tests run should be only those compatible with the test device.

Mpeg Dash/DRM - Contritbution

Hello,

Thanks for making BBC Tal as open source!

I am in the process of developing media playback applications with DRM. As part of this activity, I am planning to add DRM and Mpeg Dash support as part of BBC TAL frame work because these are essential features that is needed for me. Please let me know how can I contribute this back. Also please let me know anyone else is working on these activities.

regards,
Sudheesh.

HbbTV - missing application manager object

Using default-hbbtv-default.json the test application doesn't seem to create an applicationManager object before using it. Resulting in the following javascript error:

'undefined' is not a function (evaluating appMgr.getOwnerApplication(window.document)') on line:170

Layout sorting question

Hi Guys,

I've got a small question we have been debating internally in our company here. What was the reason for using the width of the second sort value for ad in getBestFitLayout in application.js? And is there a reason for not just using the calculated surface area?

_layouts.sort(function(a, b) {
    var ad = (a.width*a.width) + (a.height*b.height), // so the b.height here?
        bd = (b.width*b.width) + (b.height*b.height);
    if(ad == bd) return 0;
    else if(ad < bd) return 1;
    else return -1;
});

Thanks in advance!

TV Sound

Hey,

I already have an app up and running with TAL and was wondering how would I go about disabling the TV-Programs-Sound in the background or if it is actually possible to mute the audio via an TAL-App running in the TVs Browser ?!

Any hints and suggestions would be much appreciated

How to use a TextPager so the cursor keys can be used for scrolling ?

The documentation is not very clear.

I have trouble to understand how the "TextPager" component works and how to get page changing to work. If the text is bigger than the app-Element it just overlaps it and there is no way to scroll the text

How to use a TextPager so the cursor keys can be used for scrolling ?

Missing pointer support?

Pointing devices do not seem to be supported. When we test in Chrome with a regular mouse or on LG television (with Magic Motion) no hover states are shown or click actions are supported.

Also by browsing the source code, no support seems to be implemented (neither in the Javascript nor the CSS). Is this a design choice, as it's a very important (yet complicated for focus state management) feature?

Remove Sony Playstation Config files

Unfortunately Sony PS3 have stated that access to their APIs is only possible via agreement with their NDA. Whilst the config itself makes no reference to the API, there is no point us leaving the PS3 configs in this folder. Please remove both PS3 files.

load event from ComponentContainer doesn't have component property set

When the componentcontainer fires the load event the component property of the event object is not set.

This means that when a component is listening on the load event it can not check if it is self that fired it. e.g.

(evt.component === self)

Which means it must rely on its child components to each listen on their own load event and stop propagation.

TAL prevents key repeat

All keypresses handled by TAL is returning false.
If you press and hold button, keypress event will fire only once.

Getting started, I must be missing something

I've followed the instructions to get the talexample app working ;-
i.e

Change to the root directory of a web server set up to serve html, javascript and php5. Then, to check out the example:

git clone https://github.com/fmtvp/talexample.git talexample
cd talexample
git clone https://github.com/fmtvp/tal.git antie
Finally, browse to:

http://yourserver.com/talexample

And it does not work.

I know I've got php set up because I can get a valid response from a simple test file with "" in it. But when I navigate to http://localhost/talexample I get a blank page and the logs show a 500 error. How do I debug this?

Cheers

John Small

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.