Re: Intent to implement HTMLMediaElement.srcObject partially

2015-07-20 Thread Robert O'Callahan
On Mon, Jul 20, 2015 at 6:33 PM, Jonas Sicking jo...@sicking.cc wrote:

 Good point. We also need to call
 URL.revokeObjectURL(this.mOldObjectURL); in the .src setter and in the
 dtor.


OK, but we still leak if someone saves a reference to the HTMLMediaElement
as an expando property of the Blob/File.

It would be best to store a reference to the Blob or File in the
HTMLMediaElement and let the cycle collector do the work --- like we
currently do for MediaStream srcObjects.

Rob
-- 
lbir ye,ea yer.tnietoehr  rdn rdsme,anea lurpr  edna e hnysnenh hhe uresyf
toD
selthor  stor  edna  siewaoeodm  or v sstvr  esBa  kbvted,t
rdsme,aoreseoouoto
o l euetiuruewFa  kbn e hnystoivateweh uresyf tulsa rehr  rdm  or rnea
lurpr
.a war hsrer holsa rodvted,t  nenh hneireseoouot.tniesiewaoeivatewt sstvr
esn
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement HTMLMediaElement.srcObject partially

2015-07-20 Thread Jonas Sicking
On Sun, Jul 19, 2015 at 2:45 PM, Robert O'Callahan rob...@ocallahan.org wrote:
 On Thu, Jul 16, 2015 at 5:09 PM, Jonas Sicking jo...@sicking.cc wrote:

 On Wed, Jul 15, 2015 at 12:42 PM, Jan-Ivar Bruaroey j...@mozilla.com
 wrote:
  This means it will throw TypeError on set of: MediaSource objects, Blob
  objects, and File objects, for now.

 For what it's worth, I think implementing Blob/File support would be
 quite trivial. Just make

 elem.srcObject = blob;

 internally call

 URL.revokeObjectURL(this.mOldObjectURL);
 this.mOldObjectURL = URL.createObjectURL(blob);
 LoadSrc(this.mOldObjectURL);

 With this implementation, if you set elem.srcObject = blob and then release
 all references to the media element, the media element is GCed and the Blob
 is leaked. Avoiding that is exactly why the srcObject API is preferred over
 createObjectURL.

Good point. We also need to call
URL.revokeObjectURL(this.mOldObjectURL); in the .src setter and in the
dtor.

/ Jonas
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement HTMLMediaElement.srcObject partially

2015-07-19 Thread Robert O'Callahan
On Thu, Jul 16, 2015 at 5:09 PM, Jonas Sicking jo...@sicking.cc wrote:

 On Wed, Jul 15, 2015 at 12:42 PM, Jan-Ivar Bruaroey j...@mozilla.com
 wrote:
  This means it will throw TypeError on set of: MediaSource objects, Blob
  objects, and File objects, for now.

 For what it's worth, I think implementing Blob/File support would be
 quite trivial. Just make

 elem.srcObject = blob;

 internally call

 URL.revokeObjectURL(this.mOldObjectURL);
 this.mOldObjectURL = URL.createObjectURL(blob);
 LoadSrc(this.mOldObjectURL);


With this implementation, if you set elem.srcObject = blob and then release
all references to the media element, the media element is GCed and the Blob
is leaked. Avoiding that is exactly why the srcObject API is preferred over
createObjectURL.

Rob
-- 
lbir ye,ea yer.tnietoehr  rdn rdsme,anea lurpr  edna e hnysnenh hhe uresyf
toD
selthor  stor  edna  siewaoeodm  or v sstvr  esBa  kbvted,t
rdsme,aoreseoouoto
o l euetiuruewFa  kbn e hnystoivateweh uresyf tulsa rehr  rdm  or rnea
lurpr
.a war hsrer holsa rodvted,t  nenh hneireseoouot.tniesiewaoeivatewt sstvr
esn
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement HTMLMediaElement.srcObject partially

2015-07-15 Thread Jan-Ivar Bruaroey

On 7/15/15 9:28 PM, jyaven...@mozilla.com wrote:

I need to complete bug 886194 then (that add MSE supports).


Yes, or at least rename the subject slightly. ;)


PS: We have the same first name in different language. awesome.


Hey, that's rare for us!

.: Jan-Ivar :.

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement HTMLMediaElement.srcObject partially

2015-07-15 Thread Boris Zbarsky

On 7/15/15 3:42 PM, Jan-Ivar Bruaroey wrote:

This means it will support get/set of: MediaStream objects.

This means it will throw TypeError on set of: MediaSource objects, Blob
objects, and File objects, for now.


Jan-Ivar,

Do you happen to know whether other UAs support this unprefixed and if 
so what the state of their support is?


Also, of the ones who don't support it unprefixed, any idea on their 
unprefixing plans?  I have no idea is a fine response here; I'm just 
asking for information you may already have, not asking you to go do 
research.


-Boris
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement HTMLMediaElement.srcObject partially

2015-07-15 Thread Jonas Sicking
On Wed, Jul 15, 2015 at 12:42 PM, Jan-Ivar Bruaroey j...@mozilla.com wrote:
 This means it will throw TypeError on set of: MediaSource objects, Blob
 objects, and File objects, for now.

For what it's worth, I think implementing Blob/File support would be
quite trivial. Just make

elem.srcObject = blob;

internally call

URL.revokeObjectURL(this.mOldObjectURL);
this.mOldObjectURL = URL.createObjectURL(blob);
LoadSrc(this.mOldObjectURL);

/ Jonas
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement HTMLMediaElement.srcObject partially

2015-07-15 Thread smaug

On 07/15/2015 10:42 PM, Jan-Ivar Bruaroey wrote:

Hi,

We intend to un-prefix HTMLMediaElement.srcObject (it currently exists as 
HTMLMediaElement.mozSrcObject), even though it only supports a subset of the
types mandated in the spec. [1]


It is a bit unfortunate to expose the property without supporting what is in 
the spec atm, but I think it is good enough for now.


-Olli





This means it will support get/set of: MediaStream objects.

This means it will throw TypeError on set of: MediaSource objects, Blob 
objects, and File objects, for now.

The intent is still to support these other types eventually. [2]

The reason for doing this now is that this subset of funtionality is believed 
to be stable, and is valuable to user-cases in WebRTC and MediaCapture
and Streams.

Bug: https://bugzil.la/1175523

Links:
[1] 
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-srcobject
[2] 
https://html.spec.whatwg.org/multipage/embedded-content.html#media-provider-object

Platform coverage:
All.

Estimated or target release:
ASAP, Q3, 2015


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement HTMLMediaElement.srcObject partially

2015-07-15 Thread jyavenard
On Thursday, July 16, 2015 at 5:42:39 AM UTC+10, Jan-Ivar Bruaroey wrote:
 Hi,
 
 We intend to un-prefix HTMLMediaElement.srcObject (it currently exists 
 as HTMLMediaElement.mozSrcObject), even though it only supports a subset 
 of the types mandated in the spec. [1]
 
 This means it will support get/set of: MediaStream objects.
 
 This means it will throw TypeError on set of: MediaSource objects, Blob 
 objects, and File objects, for now.
 
 The intent is still to support these other types eventually. [2]
 
 The reason for doing this now is that this subset of funtionality is 
 believed to be stable, and is valuable to user-cases in WebRTC and 
 MediaCapture and Streams.
 
 Bug: https://bugzil.la/1175523
 


I need to complete bug 886194 then (that add MSE supports).

PS: We have the same first name in different language. awesome.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Intent to implement HTMLMediaElement.srcObject partially

2015-07-15 Thread Jan-Ivar Bruaroey

Hi,

We intend to un-prefix HTMLMediaElement.srcObject (it currently exists 
as HTMLMediaElement.mozSrcObject), even though it only supports a subset 
of the types mandated in the spec. [1]


This means it will support get/set of: MediaStream objects.

This means it will throw TypeError on set of: MediaSource objects, Blob 
objects, and File objects, for now.


The intent is still to support these other types eventually. [2]

The reason for doing this now is that this subset of funtionality is 
believed to be stable, and is valuable to user-cases in WebRTC and 
MediaCapture and Streams.


Bug: https://bugzil.la/1175523

Links:
[1] 
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-srcobject
[2] 
https://html.spec.whatwg.org/multipage/embedded-content.html#media-provider-object


Platform coverage:
All.

Estimated or target release:
ASAP, Q3, 2015
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement HTMLMediaElement.srcObject partially

2015-07-15 Thread Robert O'Callahan
Hooray!

Rob
-- 
lbir ye,ea yer.tnietoehr  rdn rdsme,anea lurpr  edna e hnysnenh hhe uresyf
toD
selthor  stor  edna  siewaoeodm  or v sstvr  esBa  kbvted,t
rdsme,aoreseoouoto
o l euetiuruewFa  kbn e hnystoivateweh uresyf tulsa rehr  rdm  or rnea
lurpr
.a war hsrer holsa rodvted,t  nenh hneireseoouot.tniesiewaoeivatewt sstvr
esn
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform