这是我的组件,我想从某个时间(例如 00:07:12,600)自动播放它,而不是从头开始。
import style from './Hero.module.css';
import Image from 'next/image';
import ReactPlayer from 'react-player';
import { useState } from 'react';
export default function Index() {
const [isPlaying, setIsPlaying] = useState(true);
return (
<div className={style.hero_container}>
{/* <Image src="/images/hero/hero1.jpg" alt="Logo" height={400} width={700} /> */}
<ReactPlayer
url="/videos/Dexter.S01E03.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.mkv"
playing={isPlaying}
width="100%"
height="100%"
controls={true}
/>
</div>
);
}
Run Code Online (Sandbox Code Playgroud) 嗨,我有一个列表如下: listt = ['a','b','c','d','e','f','g','h','i','j' ,'k','l','m','n','o'] 15 个成员。
我想把它变成 3 个列表,我使用了这段代码,但我想要唯一的列表。这给了我 3 个具有共同成员的列表。
import random
listt = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o']
print(random.sample(listt,5))
print(random.sample(listt,5))
print(random.sample(listt,5))
Run Code Online (Sandbox Code Playgroud)