HapticVideoSync
A Swift package for synchronizing haptic feedback with video playback.
CMTime
.AVPlayer
.dependencies: [
.package(url: "https://github.com/rtemple6/HapticVideoSync.git", .upToNextMajor(from: "1.0.0"))
]
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()
Contributions are welcome! Please submit a pull request.
Author: rtemple6
Source Code: https://github.com/rtemple6/HapticVideoSync
License: MIT license