blob: b0f40a694ff3406dbf9da8c56d6b9487fd1bd677 [file] [log] [blame]
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Custom binding for the Cast Streaming Session API.
var binding = require('binding').Binding.create('cast.streaming.session');
var natives = requireNative('cast_streaming_natives');
binding.registerCustomHook(function(bindingsAPI, extensionId) {
var apiFunctions = bindingsAPI.apiFunctions;
apiFunctions.setHandleRequest('create',
function(audioTrack, videoTrack, callback) {
natives.CreateSession(audioTrack, videoTrack, callback);
});
});
exports.$set('binding', binding.generate());