-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Putting Video in slides causes same videos to play #161
Comments
Did you check closed issue #102? There is example with adding videos to slider from repo owner. If you view it, launch video on first slide and go to the next one. You will see that it needs 1 more step to stop it by itself (tl;dr on slide with number 8 you will still hear video playing). Now if you overwrite example with code from snippet 1 snippet 1import React from "react";
import AwesomeSlider from "react-awesome-slider";
import "react-awesome-slider/dist/styles.css";
import "./styles.css";
export default function App() {
return (
<div className="App">
<h2>React Awesome Slider</h2>
<AwesomeSlider className="awesome-slider">
<div>
<video
style={{
width: "100%",
height: "100%",
position: "absolute",
top: 0,
left: 0,
objectFit: "cover"
}}
controls
src="https://archive.org/download/Popeye_forPresident/Popeye_forPresident_512kb.mp4"
/>
</div>
<div>8</div>
<div>
<video
style={{
width: "100%",
height: "100%",
position: "absolute",
top: 0,
left: 0,
objectFit: "cover"
}}
controls
src="https://archive.org/download/Popeye_forPresident/Popeye_forPresident_512kb.mp4"
/>
</div>
<div>
<video
style={{
width: "100%",
height: "100%",
position: "absolute",
top: 0,
left: 0,
objectFit: "cover"
}}
controls
src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4"
/>
</div>
<div>
<video
style={{
width: "100%",
height: "100%",
position: "absolute",
top: 0,
left: 0,
objectFit: "cover"
}}
controls
src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4"
/>
</div>
<div>42</div>
</AwesomeSlider>
</div>
);
} it works as expected if you consider the same videos. It needs 1 more step to pause the video from the first slide but third one contains the same video. Therefore it will still play when moving to it. And if you continue on changing slides, you will note the same rule. If you move from slide(3) to slide(5) video will stop playing since on fifth slide there isnt the same video and one step was made, slide(4). ps: the same rule applies to moving with bullets ps2: Update 10.06.2021 - #186 might help |
Putting video or other video components, causes the same videos to repeat. The first video plays on the 3rd and that repeats,
The text was updated successfully, but these errors were encountered: