Skip to content

A Swift package for synchronizing haptic feedback with video playback

License

Notifications You must be signed in to change notification settings

rtemple6/HapticVideoSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HapticVideoSync

A Swift package for synchronizing haptic feedback with video playback.

Features

  • Sync haptic feedback to specific timestamps in a video.
  • High precision timing with CMTime.
  • Easy integration with AVFoundation's AVPlayer.

Installation

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/rtemple6/HapticVideoSync.git", .upToNextMajor(from: "1.0.0"))
]

Usage

import HapticVideoSync

// Initialize AVPlayer
let player = AVPlayer(url: videoURL)

// Initialize HapticVideoSync with player and timestamps
let hapticSync = HapticVideoSync(player: player, timestampInSeconds: [2.5, 5.75, 10.0, 10.05, 14.9])

// Play video
player.play()

Contributing

Contributions are welcome! Please submit a pull request.

About

A Swift package for synchronizing haptic feedback with video playback

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages