#Media Detect
This repository is being developed for Chiika.
Purpose of this library is to detect what the user is currently watching. Be it via media players or using a browser such as Chrome,Firefox etc. This is achieved by either native APIs or browser extensions like chiika-chrome or chiika-firefox. Check out the platform sections to see what this library does in each platform.
Supports detecting media players,web browsers.
Supports detecting web browsers.
Soon ™
Lists every possible window
//Get all windows
var md = require('.').MediaDetect();
var currentWindows = md.GetCurrentWindows().PlayerArray;
console.log(currentWindows);
// Output will be every window in the format of
{
windowTitle,
windowClass,
processName,
PID,
Handle
}
Returns a video file open by a process.
var md = require('.').MediaDetect();
// Find a video player's PID
var videoFile = md.GetVideoFileOpenByPlayer({ pid: pid });
Returns if a tab with a given title is still open.
- Handle : Hwnd of the window
- Browser Index - (0: chrome, 1: Firefox, 2: IE )
- Title: Tab Title
Returns URL of an active tab of a given browser.
- Handle : Hwnd of the window
- Browser Index - (0: chrome, 1: Firefox, 2: IE )
Here is how this library is being used in Chiika.
Returns all tabs currently open across Safari and Chrome.
Example output
[ { tabTitle: 'Google',
tabUrl: 'https://www.google.com.tr/?client=safari&channel=mac_bm&gws_rd=cr&ei=OOrrV5m9N8T9UobIhcgK',
browser: 'Safari' },
{ tabTitle: 'Chrome',
tabUrl: 'chrome://chrome-signin/?access_point=0&reason=0',
browser: 'Chrome' } ]
Coming soon™