opened
igorpavlov
username_0
In Safari this piece of code throws error:
element.setStreamId(streamId)

TypeError: element.setStreamId is not a function. (In 'element.setStreamId(streamId)', 'element.setStreamId' is undefined)

For me it looks really strange as this function "setStreamId" is not defined anywhere in the JS code. Maybe it is implemented within plugin (but not for me for some reason)?

/*! adapterjs - v0.13.0 - 2016-01-08 */
Plugin installed v0.8.866
element.setStreamId(streamId)
issue
created
johache
username_1
Hi,

I'm assuming you are using the free plugin. Is that correct.
Is element in the DOM ? Plugin elements are only allocated by the browser as long as they are in the DOM. Before or after, you cannot rely on them.

Hope this helps,
J-O
comment
created
igorpavlov
username_0
I am using the free plugin, yes. Yes, I made sure the element is in DOM when I call this function.
comment
created
johache
username_1
Hum, then I have no idea of what is happening.
Do you have a code sample that is either live or that you could share with us ?
comment
closed
igorpavlov
username_0
issue
created
zdila
username_2
We encountered the same problem in Safari 10. `setStreamId` is not defined on the element. We also reworked our app not to use AdapterJS but we use our own code with where we create `object` element and have static reference to it (it is React app). So no replacing of `video` element to `object`, but `object` is there from the beginning.

If we remove calling `setStreamId` and only set `param` value then another problem occurs: #276
comment
created
johache
username_1
Hi,
My answer is that same as to username_0. We can't reproduce.
Do you have code sample I could use to reproduce ?
comment
created
zdila
username_2
So far we were unable to create a simple tescase reproducing it, but we'll try harder later. Other observations in our app:

* `setStreamId` is only missing if we have audio-only stream
* if we set custom property on the `object` (objectElement.foo = 'bar') then it gets lost in a fraction of second for not yet know reason
comment
created
zdila
username_2
`setStreamId` is missing if the `object` element is detached from DOM. Detaching element also causes all other custom properties to be lost. So it is probably a feature, not bug ;-)
comment
created
johache
username_1
It is indeed a feature.
The browser only instantiates the plugin objects when they are in the DOM
comment