Skip to content

Play percentage video

PlayPercentageVideoSetting #

PlayPercentageVideoSetting(percentage: int = 95)

Bases: RapidataSetting

Requires users to watch a certain percentage of the video before they can submit their answer.

Parameters:

Name Type Description Default
percentage int

The percentage of the video that must be played before the user can submit. Must be between 0 and 95.

95
Source code in src/rapidata/rapidata_client/settings/play_percentage_video.py
def __init__(self, percentage: int = 95):
    if percentage < 0:
        raise ValueError(
            "The percentage must be between 0 and 95."
        )
    if percentage > 95:
        raise ValueError(
            "The percentage must be between 0 and 95."
        )
    super().__init__(key="media_played_percentage", value=percentage)