如何解决如何在 youtube 嵌入的项目上显示与 youtube 覆盖同步的项目
我正在使用 lib react-player 在我的系统中实现 youtube 播放器,为了更好的用户体验,我们添加了一些按钮,这些按钮覆盖播放器,并在用户将播放器悬停在桌面上时显示,但我不知道将其移动到移动设备并将按钮与播放器叠加层(图块和播放器信息)同步,有人可以提供帮助吗?
component.jsx
<div
id="video-player"
className={styles.videoPlayerWrapper}
>
<ReactPlayer
{/*a few custom settings */}
height="100%"
width="100%"
/>
<div className={styles.hoverToolbar}>
{/*a few buttons*/}
</div>
</div>
styles.scss
.videoPlayerWrapper {
position: relative;
width: 100%;
height: 100%;
}
.videoPlayer {
width: 100%;
height: 100%;
& iframe {
display: flex;
flex-flow: column;
flex-grow: 1;
flex-shrink: 1;
position: relative;
overflow-x: hidden;
overflow-y: auto;
border-style: none;
border-bottom: none;
}
}
.hoverToolbar {
display: none;
:hover > & {
display: flex;
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。