Hi there,
Things are working fine with casting in Flutter with the bitmovin_player 0.2.0 package. Except that I don’t find the right way to direct the cast to a custom Receiver App.
All settings in the receiver app are okay, like the the PackageName for Android. (Testing Android right now).
Here is the code we have:
final _playerViewKey = GlobalKey<PlayerViewState>();
late Player _bitmovinplayer = Player();
late SourceConfig _SourceConfig;
late BitmovinCastManagerOptions options = const BitmovinCastManagerOptions(
applicationId: 'XXXXXX'
);
initBitmovinPlayer(String videourl, String title)
{
Future.delayed(const Duration(milliseconds: 100), () {
setState(() {
_bitmovinplayer = Player(
config: const PlayerConfig(
key: "xxxxx",
playbackConfig: PlaybackConfig(
isAutoplayEnabled: false,
isMuted: false,
)
),
);
_SourceConfig = SourceConfig(
url: videourl,
type: SourceType.progressive,
title: "$title",
);
});
});
Future.delayed(const Duration(milliseconds: 200), () {
setState(() {
_bitmovinplayer.loadSourceConfig(_SourceConfig);
});
});
}
Flexible(
fit: FlexFit.loose,
child: Center(
child:
AspectRatio(
aspectRatio: 16 / 9,
child: PlayerView(
player: _bitmovinplayer,
key: _playerViewKey
),
),
)
),
The question is: How to fit in:
await BitmovinCastManager.initialize(options: options);
Best, Peter