Re: Lack of removeTextTrack?

Thanks for this.

As for why I needed it, I wrote a short article on dynamically adding text
tracks to video (
http://www.iandevlin.com/blog/2015/02/javascript/dynamically-adding-text-tracks-to-html5-video)
and as part of that I built a demo (
http://iandevlin.com/html5/dynamic-track/) that allows you to switch
between the two methods using buttons.
I wanted to use the buttons to remove the existing text track on each click
and replace it with the new one, and was unable to. In the end I tried to
hide all the text tracks which were already there, with varying success. Of
course this means that depending on how often you click the buttons, many
text tracks get added!


======================================
Ian Devlin
iandevlin.com <http://www.iandevlin.com>
@iandevlin <http://www.twitter.com/iandevlin>
skype: idevlin
======================================

On 26 February 2015 at 10:14, Simon Pieters <simonp@opera.com> wrote:

> On Wed, 25 Feb 2015 08:51:09 +0100, Ian Devlin <ian@iandevlin.com> wrote:
>
>  Karl, thanks for the investigation. I was concentrating on the fact that
>> it
>> wasn't in the spec., hence I never checked the individial browser's bug
>> reports.
>>
>> I did perform a search on the mailing list however, but it came back with
>> nothing which is odd as you clearly show that isn't the case. I must have
>> made a mistake somehow, sorry, I wasn't being lazy!
>>
>> Not sure about Mozilla's "it wouldn't be good to be able to remove
>> TextTracks that have been sourced from the media resource or from
>> TrackElement for that matter", with no explanation as to WHY it wouldn't
>> be
>> good.
>>
>> https://www.w3.org/Search/Mail/Public/search?keywords=removetexttrack
>> reports "As per discussion of cloned by in WHATWG, there is no need for
>> this feature at this time, so marking WONTFIX for now.", where/how might
>> one find more information on this discussion? I cannot find it.
>>
>
> Blocks: 22601
>
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=22601
>
>  I am only asking about this as I needed removeTextTrack the other day and
>> was surprised to find that it doesn't exist, even for completeness sake
>> (weak argument I know).
>>
>
> Why did you need it?
>
>  ======================================
>> Ian Devlin
>> iandevlin.com <http://www.iandevlin.com>
>> @iandevlin <http://www.twitter.com/iandevlin>
>>
>> skype: idevlin
>> ======================================
>>
>> On 25 February 2015 at 03:11, Karl Dubost <karl@la-grange.net> wrote:
>>
>>  Ian,
>>>
>>>
>>> Le 25 févr. 2015 à 05:38, Ian Devlin <ian@iandevlin.com> a écrit :
>>> > I was exploring the Text Track API the other day and noticed that
>>> although there's a function to add a text track to media, addTextTrack()
>>> (
>>> http://www.w3.org/html/wg/drafts/html/master/#dom-media-addtexttrack)
>>> there doesn't seem to be any way to remove one, for example
>>> removeTextTrack().
>>>
>>> I don't know myself.
>>> Digging around:
>>>
>>> # Apple
>>> * Bug 114630: HTMLMediaElement::removeTextTrack should clear track
>>> client
>>> (FIXED)
>>>   https://bugs.webkit.org/show_bug.cgi?id=114630
>>>
>>> # Mozilla
>>> * Bug 891052 - [webvtt] Implement RemoveTextTrack() (INVALID)
>>>   https://bugzilla.mozilla.org/show_bug.cgi?id=891052
>>>   According to the discussion on the W3C bug this won't be
>>>   implemented in the near future as it wouldn't be good to
>>>   be able to remove TextTracks that have been sourced from
>>>   the media resource or from TrackElement for that matter.
>>>
>>> # Google
>>>   Issue 249427: Implement HTMLMediaElement.audioTracks &
>>> HTMLMediaElement.videoTracks
>>>   https://code.google.com/p/chromium/issues/detail?id=249427#c6
>>>
>>> # W3C
>>> * Bug 22597 - Add API for RemoveTextTrack() (WONTFIX)
>>>   https://www.w3.org/Bugs/Public/show_bug.cgi?id=22597
>>> * List results
>>>   https://www.w3.org/Search/Mail/Public/search?keywords=removetexttrack
>>>
>>>
>>> --
>>> Karl Dubost [image: 🐄]
>>> http://www.la-grange.net/karl/
>>>
>>>
>>>
>
> --
> Simon Pieters
> Opera Software
>
>

Received on Friday, 27 February 2015 07:58:50 UTC