kmep 0.3.0
kmep: ^0.3.0 copied to clipboard
A stable alternative to NewPipeExtractor for Dart and Flutter: YouTube extraction fully in-process (no JVM, no Python, no server). Multi-client InnerTube fallback (ANDROID_VR/WEB/IOS/TV), on-device pl [...]
kmep #
Dart package for the KMEP YouTube extraction library. See the repository README for the full pitch, feature matrix, and platform integration guide — this file is just the pub package quick-reference.
Quick start #
import 'package:kmep/kmep.dart';
final kmep = Kmep.withOnDevicePoToken(
jsRuntime: myPlayerJsRuntime, // see ../flutter_integration or NodeProcessJsRuntime
potJsRuntime: myBotGuardRuntime,
fetchText: (url) => http.get(Uri.parse(url)).then((r) => r.body),
);
final video = await kmep.getVideo('dQw4w9WgXcQ');
final results = await kmep.search('lofi hip hop');
Runnable version: example/example.dart.
Layout #
lib/
├── kmep.dart # public export barrel — start here
└── src/
├── kmep_client.dart # the Kmep facade
├── models/ # VideoInfo, KMEPStream, VideoSearchResult, ...
├── search/ # search + shorts feed
├── channel/ # channels + playlists (browse endpoint)
├── comments/ # comments + thread replies (next endpoint)
├── clients/ # InnerTube client + per-client configs
├── parsers/ # player response parsing
├── resolvers/ # signature/n-parameter resolution (player.js)
├── runtimes/ # NodeProcessJsRuntime (server/CLI JsRuntime)
└── core/ # orchestrator, PO tokens, cache, remote config
Development #
dart pub get
dart analyze
dart test
Diagnostic tools that hit live YouTube (not part of the public API,
useful when working on the extractor itself) are in tool/ — see
../docs/AGENT_HANDOFF.md.