init method
- @override
override
Initializes any data needed by this model.
Implementation
@override
Future<void> init() async {
models.messages.stream.onMessage<VideoData>(
name: VideoData().messageName,
constructor: VideoData.fromBuffer,
callback: handleData,
);
models.messages.stream.onMessage<VideoCommand>(
name: VideoCommand().messageName,
constructor: VideoCommand.fromBuffer,
callback: (command) => _handshake = command,
);
fpsTimer = Timer.periodic(const Duration(seconds: 1), resetNetworkFps);
reset();
}