kinetic_player 2.0.2
kinetic_player: ^2.0.2 copied to clipboard
Multi-core Flutter video player: GSYVideoPlayer 13.1.0 (Android) + SGPlayer (iOS/macOS) + Artplayer.js (Web).
2.0.2 #
Features #
- Android danmaku / watermark: Live in the player layout and follow window fullscreen (clone sync).
- Android ads: Full pre-roll / mid-roll with skip countdown UI (
gsyPlayWithPreRollAd,gsySetMidRollAdswithpositionMs/adUrl/contentUrl,gsySkipAd); works in fullscreen. - List auto-play:
GsyAutoPlayVideoListuses list-level visibility and mounts a player only for the active cell. - Pure play mode: Also hides volume / settings / title.
- SG creation:
GsyUiConfig.speed/loopingapplied on iOS / macOS create.
Fixes #
- Screenshot / GIF / filters / rotation / mirror / subtitles target the active fullscreen window when present.
Removals #
- Detail-page seamless handoff removed (
gsySeamlessHandoffParams). - Multi-instance simultaneous play no longer documented as supported.
- Dead
customRatioparameter removed fromgsySetGsyShowType.
Docs #
- GSY_FEATURES / USAGE / README aligned to fully delivered features only; HDR links marked as test sources, not HDR product support; macOS gestures clarified (iOS only pans).
2.0.1 #
Fixes #
- macOS center play/pause icon: Bake play and pause SF Symbols into a fixed square canvas and set
imageScaling/ cell to.scaleNone, so AppKit no longer fattenspause.fillinside the 60×60 hit target.
Docs #
- Document GstPlayer selection for Linux / Windows: GitHub, pub.dev. README / USAGE (EN + ZH) updated.
2.0.0 #
Features #
- Flutter Web: Artplayer.js 5.4.0 via
HtmlElementView; public API aligned with Android / iOS / macOS. Web-only APIs onArtplayerVideoControllerImpl/ArtplayerUiConfig(does not polluteCommonVideoController). See doc/WEB_ARTPLAYER.md. - Web streaming: HLS / DASH via
hls.js/dashjswith automaticcustomTypefor.m3u8/.mpd. - Artplayer plugins: Bundled official plugins through
artPlugins/ArtplayerPluginKeys(danmuku, HLS/DASH control, VTT thumbnail, subtitles, Chromecast, VAST, chapter, auto-thumbnail, ambilight, Document PiP, audio-track, JASSUB, ASR, ads).danmukuMaskremains CDN lazy-load (MediaPipe size). - In-process Web bridge:
ArtplayerViewRegistryinstead of dual-end MethodChannel (avoids conflict on Web). - pub.dev zero-config Darwin:
sharedDarwinSourcesingle treedarwin/kinetic_player(Package.swift + Sources); remotebinaryTargetdownloads SGPlayer. No host Scheme Pre-action. CocoaPods usesdarwin/kinetic_player.podspec→ensure_sgplayer.
Fixes #
- Web audio tracks: No fake “Default” track when the browser exposes no
audioTracks;selectAudioTrack(0)is a no-op success when the list is empty. - macOS center play icon: Stop AppKit from stretching SF Symbols into the 60×60 hit target (
imageScaling+ fixed symbol size / optical centering forplay.fill). - macOS pan gestures: Removed unreliable pans inside Flutter
AppKitView(and there is no public brightness API). Seek / volume / tracks use the same button + popup pattern as the gear / 音轨 UI (progress slider, speaker panel, settings panel). iOS keeps horizontal seek / left brightness / right volume pans.
Docs #
- Web guides WEB_ARTPLAYER.md / WEB_ARTPLAYER_EN.md; README / USAGE / EXAMPLE / Darwin docs updated for Web, macOS interaction differences, and pub.dev out-of-the-box SPM.
1.0.0 #
Features #
- macOS support: SGPlayer on macOS via
AppKitView, sharing Darwin UI/bridge with iOS (darwin/SgNativePlayerBridge,darwin/kinetic_player/Sources/SgPlayerKit). Minimum macOS 11. - Unified Darwin tooling: Shared scripts under
darwin/scripts/sgplayer/(ios|macos); artifacts indarwin/Frameworks/{ios,macos}/; manifests indarwin/sgplayer/manifest.*.json. - SPM binaryTarget: Remote
binaryTarget(url:checksum:)for iOS/macOSPackage.swift, with Example Scheme Pre-actions andspm_prebuild_hook/ensure_sgplayer(download → local build fallback). - Docs: Single guide doc/DARWIN_SGPLAYER.md; README / USAGE / EXAMPLE aligned for iOS + macOS.
Fixes #
- Android PiP: Clamp picture-in-picture aspect ratio (and guard failures) to avoid crashes on ultra-wide / extreme aspect videos.
- Large remote media (Android): Safer timeouts / cache behavior for big remote MKV-style streams (e.g. disable aggressive play-while-cache where it caused hangs).
- iOS / macOS SPM: Package targets stay inside the Flutter-ephemeral package root (synced sources + local xcframework);
SgPlayerKitcompiled in the mainkinetic_playertarget soFlutter/FlutterMacOSresolve correctly. - Platform view APIs: Correct iOS vs macOS factory signatures (
FlutterPlatformViewvs returningNSView;createArgsCodecoptionality). - macOS Example: Enable
com.apple.security.network.clientfor sandboxed outbound streaming; align deployment target to 11.0.
Enhancements #
- Example: HDR / high-bitrate demo sources; Android kernel switcher in the demo UI; macOS Example app + Pre-action hooks.
- Android (carried from 0.0.4 line): default kernel IJKPlayer;
GsyUiConfig.ijkEnableAccurateSeek→enable-accurate-seekfor IJK.
0.0.4 #
Fixes #
- Android default kernel: Set to IJKPlayer when plugin loads.
- Android IJK accurate seek:
GsyUiConfig.ijkEnableAccurateSeek(defaulttrue) setsenable-accurate-seek=1viaGSYVideoManager.setOptionModelListto reduce keyframe bounce when dragging the progress bar; only effective for IJK kernels. - iOS: inaccurate seek / progress-bar scrubbing and background playback issues.
0.0.3 #
Fixes #
- Volume persistence: Fixed volume level and slider position resetting after pause/resume, replay after completion, or switching video source. Android re-applies saved volume on
onPrepared/ playback start; iOS usesapplySavedVolumeon play/replay and returns_savedVolumefromcurrentVolume(). - Picture-in-Picture (Android): Fixed auto PiP not triggering when playback started via GSY auto-play or native play button (
isPlayingwas only set from Flutterplay()). Playback state now syncs with native GSY events; PiP eligibility uses actual player state (isPlaybackActive()). - Volume gesture conflict (Android): When
showVolumeToolbaris enabled, GSY’s built-in left-edge volume slider gesture is disabled so only the Bilibili-style volume popup is shown. - Volume drag label: Fixed percentage label (
50%) flickering or disappearing while dragging the volume slider. - Toolbar icons: Unified fullscreen button size with settings/volume icons (28dp); replaced GSY default enlarge icon with matching vector assets.
Enhancements #
- Volume UI: Dragging the vertical volume slider shows a percentage label to the left of the track; the label hides on release. Panel background width reduced to 44dp (label floats outside the panel).
- iOS gesture controls: Added GSY-style pan gestures — horizontal seek, left-half brightness, right-half volume — with a center HUD overlay. Controlled by the shared
enableNativeControlsflag (same as Android). System brightness is restored when the player is disposed. Swipe-volume is blocked while the volume popup is open or its slider is being dragged (same as Android), and volume sensitivity matches GSY (~3×). - Render rotate / mirror: Android already exposed
gsySetRenderRotation/gsySetMirrorHorizontal; iOS adds matchingsgSetRenderRotation/sgSetMirrorHorizontalviaCGAffineTransformon the video view. Example app includes rotate/mirror controls for both platforms. - Cover / keep last frame: Android uses GSY
setThumbImageView+ KeepLastFrameVideo-styleonAutoCompletion; iOS uses a cover overlay and hides it when keeping the last frame. Config:GsyUiConfig.coverUrl/keepLastFrameWhenComplete; runtime:gsySetCoverUrl/gsySetKeepLastFrameWhenComplete(iOS:sgSet*). - Rotate fill + vertical mirror: 90°/270° rotation now scales to center-fill the player; added
gsySetMirrorVertical/sgSetMirrorVertical. - Rotate / mirror positioning fix: Android now uses GSY
View.setRotation+scaleX/scaleY(MeasureHelper remeasure) instead of a mis-pivoted TextureView matrix; iOS usesSgTransformHostView(clipping host + inner content transform) so Auto Layout stays stable and the Metal render target stays identity. - SGPlayer deep APIs: buffered progress + error details, pitch, VR/VRBox + viewport, demuxer options (timeout/UA/headers), video track selection, multi-segment
SGMutableAsset, background playback policy. - Example: Explicitly enables
pictureInPictureEnabled: true; added PiP usage hint in the control panel.
0.0.2 #
Fixes & Optimizations #
- Audio Track & Gesture Fixes: Fixed an issue where audio track settings were reset upon replay, and resolved conflicts between audio track settings and gesture operations.
- Audio Control Fixes: Fixed conflicts between the audio track bar and gesture-based volume adjustments.
- Example Optimization: Optimized the example project to prevent the application from failing to open after enabling code obfuscation (ProGuard) on Android.
0.0.1 #
Public API #
- Unified
CommonVideoController:play/pause/stop/seekTo/setScaleMode/setRate/setVolume/setMute/switchVideoSource/getAudioTracks/selectAudioTrack/getDuration/getCurrentPosition/getVideoSize/setLooping/captureFrame/dispose - Dual-platform MethodChannel status and progress callbacks (
onPlayerStateChanged/onPositionChanged, throttled at approx. 250ms)
Native Control Bar (Android GSY + iOS SGPlayer) #
- Bilibili-style UI: Click the speaker icon to pop up a vertical volume bar; click the gear icon to open the settings panel for audio track selection.
- Unified track colors for the progress bar and volume bar (
kinetic_seek_progress/KineticPlayerColors). - Added
GsyUiConfig.showSettingsButton(defaults totrue). showVolumeToolbarnow controls the speaker button (instead of a persistent bottom volume bar).- The bottom area no longer intercepts clicks after the control bar is hidden, allowing the bottom-right corner to normal toggle the control bar visibility.
Picture-in-Picture (Android) #
GsyUiConfig.pictureInPictureEnableddefaults totrue.- Automatically enters PiP when switching to the background during playback (
onUserLeaveHint, API 26+). - Supports
setAutoEnterEnabledon Android 12+. - Manual API:
gsyEnterPictureInPicture(). - Host app configuration required:
supportsPictureInPicture,resizeableActivity, and forwardingKineticPlayerPlugin.handleUserLeaveHint. - iOS: SGPlayer custom rendering, system PiP is not supported.
Playback Experience #
- Fixed an issue where playback could not be replayed after completion (Android completion state now executes seek(0) first; iOS uses
replayFromBeginning).
Android GSY Advanced Capabilities #
- Filters, danmaku (bullet comments), subtitles, screenshots/GIFs, lists, Exo tracks, watermarks, etc. (see GSY_FEATURES.md).
iOS SGPlayer #
- Native control bar, full screen,
sgSetVRMode. - Audio track APIs aligned with the Android public layer.