Commit 76aa1e7653
Unsigned
Layout: unified · split
start_video.py +6
| @@ -50,4 +50,10 @@ def get_percentage_watched(ipc_socket_path): | ||
| 50 | 50 | return percentage_watched |
| 51 | 51 | return None |
| 52 | 52 | |
| 53 | def percentage_watched(playback_time:int, duration:int): | |
| 54 | if playback_time is not None and duration is not None and duration > 0: | |
| 55 | video_percentage_watched = (playback_time/duration) * 100 | |
| 56 | return video_percentage_watched | |
| 57 | return None | |
| 58 | ||
| 53 | 59 | # start_video("https://video.wixstatic.com/video/36bbae_bef5207b465447f19c0f9366f3ee1c27/720p/mp4/file.mp4", "10", ['--start=100']) |
| \ No newline at end of file | ||