About this board

EmdedVideo suport VK.com

13
151.249.167.17 (talkcontribs)
Aka sektor (talkcontribs)

It's me.

Sphynkx (talkcontribs)

Hi!! Show plz links to problematic VK/OK-videos..

Aka sektor (talkcontribs)
Aka sektor (talkcontribs)

And i dont use code for VK. He 2016 year. Maybe old.

And I dont unederstand howto add it to VideoServices.php

Code for OK very simple. I added it very fast, and it work.

I want same for VK. And work on EmbedVideo 2.7.0

Sphynkx (talkcontribs)

Unlike most videoservices VK has 2 IDs for videopage and 3 IDs for embedded code (oid, id and hash), which calculated by some algorythms that VK was not publish. It is cause why VK embedding didn't support. But final embed code would receive from VK-page with video (see More -> Export). There is additional help-function vkVideo(). It's just download VK-page with video by curl request, matches 3 necessary IDs (which was generated secretly somewhere in internals of VK company) and returns final iframe-tag with embed-code in it.

For your sample initial 2 IDs are 326617891 and 456240219

vkVideo() should match 3 IDs oid=326617891 id=456240219 and hash=b339b9fe9fce81a6

Due to EmbedVideo extension is able to work only with 1 ID there was need some trick to pass 3 IDs to vk section. Array value in line:

!                 $this->service['embed'],

was replaced with call of vkVideo(). Array value itself was "moved" into vkVideo(). At beginning it checks service and returns original value (if non-VK) or works as told above and returns prepared iframe-tag.

You need to add vk-section somewhere between existing ones, and add additional vkVideo() somewhere at the bottom of VideoServices.php but before $data = array(...). At $data = array(...) need to replace line

!                 $this->service['embed'],

with line

!                 $this->vkVideo(),

Aka sektor (talkcontribs)
Aka sektor (talkcontribs)

I try paste code, but MW dont load after this.

Sphynkx (talkcontribs)
Aka sektor (talkcontribs)

Not work: В тег EmbedVideo введен неверный id "https://vk.com/video326617891_456240219" видео для сервиса "vk".

I use tags:

{{#ev:vk|https://vk.com/video326617891_456240219}}

Aka sektor (talkcontribs)

Log:

Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/h99724/data:.) in /home/h99724/data/www/my-site.ru/includes/libs/filebackend/fsfile/TempFSFile.php on line 90
Call Stack:
0.0003 241448 1. {main}() /home/h99724/data/www/my-site.ru/index.php:0
0.0008 277128 2. require('/home/h99724/data/www/my-site.ru/includes/WebStart.php') /home/h99724/data/www/my-site.ru/index.php:40
0.0107 1717912 3. require_once('/home/h99724/data/www/my-site.ru/includes/Setup.php') /home/h99724/data/www/my-site.ru/includes/WebStart.php:137
0.0146 2342216 4. wfTempDir() /home/h99724/data/www/my-site.ru/includes/Setup.php:613
0.0148 2357472 5. TempFSFile::getUsableTempDirectory() /home/h99724/data/www/my-site.ru/includes/GlobalFunctions.php:2082
0.0148 2358528 6. is_dir() /home/h99724/data/www/my-site.ru/includes/libs/filebackend/fsfile/TempFSFile.php:90
Sphynkx (talkcontribs)

In logs something other than EmbedVideo issues because EmbedVideo doesn't operate with server's FS.

As could see additional code inserted correctly.. But appears suspicion that cause of problem is on VK side. I used this addition in my personal wiki-engine and now found that embedded vk-videos that recently worked well, now shows the same error message (ext and WM versions same as in past, videos still available on VK). Moreover, if to hardcode output of generated iframe code (copypasted from VK site) to output of vkVideo():

#return ($vkurl);

return('<iframe src="https://vk.com/video_ext.php?oid=326617891&id=456240219&hash=b339b9fe9fce81a6" width="640" height="360" frameborder="0" allowfullscreen></iframe>');

or directly to vk-section, extension shows the same error. Doubtly that issue bound with code/version oldness in this case.

Also need to check with anonymously accessible vk-video (to exclude auth factor)..

Aka sektor (talkcontribs)
Reply to "EmdedVideo suport VK.com"
There are no older topics