i wanna force the person who launches said program to watch the video that launches
until the end
no alt tabbing
no "esc" key
nothing just watch it until the end and it closes
`import pygame
import sys
from pyvidplayer import Video
Initialize Pygame
pygame.init()
Get the size of the screen
screen_info = pygame.display.Info()
SCREEN_WIDTH, SCREEN_HEIGHT = screen_info.current_w, screen_info.current_h
Set up the display to match the screen size
SCREEN = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT), pygame.FULLSCREEN)
pygame.display.set_caption("Video Player")
Load the video
vid = Video("vid/hi.mp4")
vid.set_size((SCREEN_WIDTH, SCREEN_HEIGHT)) # Scale the video to the screen size
def intro():
clock = pygame.time.Clock()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT: # Handle the quit event
vid.close() # Stop the video playback
pygame.quit()
sys.exit()
elif event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE:
# Allow exit with the ESC key
vid.close()
pygame.quit()
sys.exit()
# Draw the video frame
vid.draw(SCREEN, (0, 0))
# Update the display
pygame.display.update()
# Control frame rate
clock.tick(30) # Adjust to 30 FPS or the desired frame rate
Run the intro function
intro()
`
this is my current script