google-drive-realtime-api

Google Drive Realtime API in a Chrome Packaged App

南楼画角 提交于 2019-12-01 14:37:18
Has anyone figured out how to use the Google Drive Realtime API in a Chrome Packaged App ? Loading gapi in a sandboxed iframe results in: Uncaught TypeError: Cannot read property 'prototype' of undefined cb=gapi.loaded_0:6 gapi.load("auth:client,drive-realtime,drive-share", function(){...}); Please see my example repo at: https://github.com/damondouglas/sandbox-cpa-drive-rt Damon - I took the example you posted on GitHub and changed it to use a webview which works fine. I think you are restricting yourself to not using one for artificial reasons. It may still be possible to solve this issue

Google Drive Realtime API in a Chrome Packaged App

流过昼夜 提交于 2019-12-01 12:42:11
问题 Has anyone figured out how to use the Google Drive Realtime API in a Chrome Packaged App? Loading gapi in a sandboxed iframe results in: Uncaught TypeError: Cannot read property 'prototype' of undefined cb=gapi.loaded_0:6 gapi.load("auth:client,drive-realtime,drive-share", function(){...}); Please see my example repo at: https://github.com/damondouglas/sandbox-cpa-drive-rt 回答1: Damon - I took the example you posted on GitHub and changed it to use a webview which works fine. I think you are

Opening specific MimeTypes with google picker

 ̄綄美尐妖づ 提交于 2019-12-01 09:22:14
I am working with realtime API and I am making use of realtime-client-utils. Using existing code, I am creating realtime files with this method: createRealtimeFile = function(title, callback) { gapi.client.load('drive', 'v2', function() { gapi.client.drive.files.insert({ 'resource': { mimeType: rtclient.REALTIME_MIMETYPE, title: title } }).execute(callback); }); } and then I am trying to open files with this picker: var popupOpen = function () { var token = gapi.auth.getToken().access_token; var view = new google.picker.View(google.picker.ViewId.DOCS); view.setMimeTypes(rtclient.REALTIME

Google Drive Realtime API OAuth2 Refresh Errors (Part 3)

早过忘川 提交于 2019-12-01 08:03:01
I'm having some issues with the realtime API reconnecting properly after a laptop/phone comes back from sleep/standby. The API properly detects that it needs to have a refresh OAuth token and throws an error, however once the token has been refreshed the realtime API does not correctly reconnect to the remote service. This is somewhat similar to (Part 2) , however this only occurs after a couple hours of a lost connection. I would expect that after the OAuth token is refresh, the realtime API would pick it up and resync itself with the remote server. Instead, it appears that the realtime API

How to build and use a collaborative data model with Realtime API?

旧时模样 提交于 2019-12-01 07:40:22
问题 I have tried to follow the step described at Build a Collaborative Data Model and I end up with the following code : function onLoad(doc){ var Book = function(){}; var model = doc.getModel(); gapi.drive.realtime.custom.registerType(Book, 'Book'); Book.prototype.title = gapi.drive.realtime.custom.collaborativeField('title'); Book.prototype.author = gapi.drive.realtime.custom.collaborativeField('author'); Book.prototype.isbn = gapi.drive.realtime.custom.collaborativeField('isbn'); Book

Google Drive Realtime API OAuth2 Refresh Errors (Part 3)

谁说我不能喝 提交于 2019-12-01 06:05:10
问题 I'm having some issues with the realtime API reconnecting properly after a laptop/phone comes back from sleep/standby. The API properly detects that it needs to have a refresh OAuth token and throws an error, however once the token has been refreshed the realtime API does not correctly reconnect to the remote service. This is somewhat similar to (Part 2), however this only occurs after a couple hours of a lost connection. I would expect that after the OAuth token is refresh, the realtime API

Angular 2 with Google Drive Realtime API

怎甘沉沦 提交于 2019-11-30 11:45:36
I'm looking to create a new application based on the Drive Realtime API and want to do it with the shiny new Angular 2 framework. However, I'm kind of stuck trying to figure out how to best integrate the APIs and philosophies. I can't find any examples that use both. What is the best way to get these two frameworks working together. In particular, how do I reconcile the differences between Angular's two way binding with ngModel and the Realtime APIs data binding with gapi.drive.realtime.databinding.Binding ? You can download the declaration file (*.d.ts) for the Google Drive Realtime API here

Is there a way to get links to a google drive video file with redirector.googlevideo.com?

帅比萌擦擦* 提交于 2019-11-29 23:21:38
问题 I used to get links for video streams from google drive file like this: https://r10---sn-3c27ln7s.c.docs.google.com/videoplayback?requiressl=yes&id=74dd098b62525d54&itag=18&source=webdrive&app=docs&ip=188.163.98.118&ipbits=8&expire=1442346818&sparams=requiressl,id,itag,source,ip,ipbits,expire&signature=397C18F3AE6C610474D08C488D5AF100ED216BFA.F0054EA555A89D47246A4D7940737FE31A4F3EF&key=ck2&mm=30&mn=sn-3c27ln7s&ms=nxu&mt=1442343170&mv=m&pl=18&type=video/mp4 but now they've became IP-tied and

Angular 2 with Google Drive Realtime API

不想你离开。 提交于 2019-11-29 17:44:41
问题 I'm looking to create a new application based on the Drive Realtime API and want to do it with the shiny new Angular 2 framework. However, I'm kind of stuck trying to figure out how to best integrate the APIs and philosophies. I can't find any examples that use both. What is the best way to get these two frameworks working together. In particular, how do I reconcile the differences between Angular's two way binding with ngModel and the Realtime APIs data binding with gapi.drive.realtime

Google Realtime API - what is the role of a shortcut file in google drive?

谁说胖子不能爱 提交于 2019-11-29 16:48:14
In the quickstart demo , a shortcut file is created in Google Drive. I figure that this shortcut file facilitates the transfer of messages somehow. Can someone explain where this shortcut file points to and it's purpose in Realtime collaboration flow? The shortcut file is the "file" object that shows up in the user's drive. It has a pointer to the realtime data model. It doesn't actually do much, its just the place where basic information like title, share settings, etc are saved. You need some file object that can hold this information. If you have separate file content that you want to