AgoraIO-Community / AgoraWebSDK-NG

The Next Generation of Agora Web SDK
https://agoraio-community.github.io/AgoraWebSDK-NG/
161 stars 75 forks source link

Provide means to configure class on video-player-track div #95

Closed pgib closed 4 years ago

pgib commented 4 years ago

Describe the bug

Using the play() method on a VideoTrack will inject a <div> container inside the HTMLElement that it's provided, but it's hard to style because there's no opportunity to provide a class attribute. Can this be added to the VideoPlayerConfig so that developers can provide a class name to use with the <div> instead of having to create awkward styles to try to target this <div>? Perhaps also being able to turn off the injected style attributes would be good, too.

image

Platform and Browser: All

SDK Version: v4.1.0 build: v4.1.0-0-g64d4440(9/4/2020, 5:57:23 PM)

HAHAHA44 commented 4 years ago

You don`t need to set style for the injected element. You can set the attribute overflow: hidden for the container, so that the inner will not overflow the container.

HAHAHA44 commented 4 years ago

Are there any scenarios where you need to customize the injected elements` style?