play method
播放卡片视频
调用 SDK 的 playDramaCard 方法,原生层会调用卡片的 play/start 方法。
Implementation
Future<void> play() async {
_ensureReady();
try {
final result = await PangrowthContent.playDramaCard(_cardId!);
if (result) {
debugPrint('DramaCardController: 卡片开始播放 - $_cardId');
}
} catch (e) {
debugPrint('DramaCardController: 播放卡片失败 - $e');
rethrow;
}
}