Skip to contents

By default, all skills except reception have a timing of c(-5, 3), meaning that the video clip will start 5 seconds before the recorded time of the event and end 3 seconds after its recorded time. Reception has a timing of c(-2, 6) (because reception usually has the same timestamp as the serve)

Usage

ov_video_timing(...)

ov_video_timing_df(x)

Arguments

...

: named parameters that will override the defaults. Each parameter should be a two-element numeric vector

x

data.frame: a data.frame of timings that will override the defaults, with columns skill, phase, start_offset (start offset in seconds, default = -5), and duration (duration in seconds, default = 8)

Value

For ov_video_timing a named list, with names corresponding to skills ("Serve", "Reception", etc). For ov_video_timing_df, a data.frame with columns skill, phase, start_offset, and duration

Details

ov_video_timing_df accepts and returns a data.frame rather than a named list. The data.frame format also allows timings to be differentiated by play phase ("Reception" vs "Transition").

Examples


## defaults
ov_video_timing()
#> $Serve
#> [1] -5  3
#> 
#> $Reception
#> [1] -2  6
#> 
#> $Set
#> [1] -5  3
#> 
#> $Attack
#> [1] -5  3
#> 
#> $Block
#> [1] -5  3
#> 
#> $Dig
#> [1] -5  3
#> 
#> $Freeball
#> [1] -5  3
#> 

## with different settings for serve and reception
ov_video_timing(serve = c(-2, 2), reception = c(-3, 1))
#> $Serve
#> [1] -2  2
#> 
#> $Reception
#> [1] -3  1
#> 
#> $Set
#> [1] -5  3
#> 
#> $Attack
#> [1] -5  3
#> 
#> $Block
#> [1] -5  3
#> 
#> $Dig
#> [1] -5  3
#> 
#> $Freeball
#> [1] -5  3
#> 

## as data.frame
ov_video_timing_df(data.frame(skill = "Set", phase = "Transition",
                              start_offset = -5, duration = 10))
#>        skill      phase start_offset duration
#> 1        Set Transition           -5       10
#> 2      Serve      Serve           -5        8
#> 3  Reception  Reception           -2        8
#> 4        Set  Reception           -5        8
#> 5     Attack  Reception           -5        8
#> 6     Attack Transition           -5        8
#> 7      Block  Reception           -5        8
#> 8      Block Transition           -5        8
#> 9        Dig Transition           -5        8
#> 10  Freeball  Reception           -5        8
#> 11  Freeball Transition           -5        8