[package] name = "browser-video-capture" version = "0.1.0" authors = ["Rostyslav Bohomaz "] edition = "2018" description = "Raw video frame capture in WebAssembly for browser environment." license = "MIT/Apache-2.0" repository = "https://github.com/rostyq/browser-video-capture-rs" [lib] crate-type = ["cdylib", "rlib"] [features] default = [] # common canvas features offscreen = ["web-sys/OffscreenCanvas"] html = ["web-sys/HtmlCanvasElement"] # common context features 2d = ["web-sys/ImageData"] gl = [ "web-sys/WebGlShader", "web-sys/WebGlTexture", "web-sys/WebGlProgram", "web-sys/WebGlBuffer", "web-sys/WebGlUniformLocation", ] webgl = ["gl", "web-sys/WebGlRenderingContext"] webgl2 = ["gl", "web-sys/WebGl2RenderingContext"] # capture features offscreen-2d = ["offscreen", "2d", "web-sys/OffscreenCanvasRenderingContext2d"] offscreen-webgl = ["offscreen", "webgl"] offscreen-webgl2 = ["offscreen", "webgl2"] html-2d = ["html", "2d", "web-sys/CanvasRenderingContext2d"] html-webgl = ["html", "webgl"] html-webgl2 = ["html", "webgl2"] # extra features image = ["dep:image"] [dependencies] web-sys = { version = "0.3.69", features = ["HtmlVideoElement"] } image = { version = "0.25.2", default-features = false, optional = true } [dev-dependencies] wasm-bindgen = "0.2.84" wasm-bindgen-test = "0.3.34" wasm-bindgen-futures = "0.4.42" web-sys = { version = "0.3.69", features = [ "Document", "Element", "HtmlCanvasElement", "CanvasRenderingContext2d", "MediaStream", "MediaStreamTrack", ] } gloo = { version = "0.11.0", default-features = false, features = [ "utils", "console", ] } console_error_panic_hook = "0.1.7" image = { version = "0.25.2", default-features = false } rstest = "0.22.0"