Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendVideo Actually accepts caption field #13

Closed
jonnywilliamson opened this issue Jul 22, 2015 · 11 comments
Closed

sendVideo Actually accepts caption field #13

jonnywilliamson opened this issue Jul 22, 2015 · 11 comments

Comments

@jonnywilliamson
Copy link
Contributor

Hi,

The official docs show that you can send a caption with sendMessage.

There is no mention of being able to send a caption with sendVideo, however when you actually send a video in a normal client (ie iOS app, desktop etc) you CAN set a caption.

I have added the caption variable to the sendVideo method in your library and surprise surprise it works perfectly.....but it seems like it was missed when they wrote the documents on the official Telegram site.

Would you accept a PR with this added or do you prefer to keep you library in strict adherence to the official docs?

@irazasyed
Copy link
Owner

Hi @jonnywilliamson,

That's a great find man 👍

I'm open for the PR. Since the library itself is unofficial and as already stated by their support, they're still in process of improving things. Maybe they missed it and would be made available in their next update or so.

Just make sure you properly test several times though. If it's something that temporarily works sometimes and doesn't work always, then it's not really a good idea to add it.

I'll drop a message to their support and query about it as well. Still waiting for the response for the #9 issue.

Thanks!

@jonnywilliamson
Copy link
Contributor Author

Sorry was out of country with work.

Will do this v shortly.

@irazasyed
Copy link
Owner

No problem. Take your time! Thanks.

@jonnywilliamson
Copy link
Contributor Author

Thought I was going mad.

A couple of days ago I checked the docs and no mention of caption on the sendVideo Method. Looked at it today and there it was!

Quick check of internet archive shows I wasn't going mad:

Before
before

And now:
after

@irazasyed
Copy link
Owner

Ah i see. They must've added recently. So it's official now, good 👍

Thanks for the contribution @jonnywilliamson. Appreciate it :)

@jonnywilliamson
Copy link
Contributor Author

Actually before this gets closed I'm having a lot of trouble with the sendVideo method (at least on iOS - hence my delay in sending the PR).

Here are 3 video files that are on my phone (each less than 400Kb) please download them to a folder.

Video1
Video2
Video3

Now, here's a simple route I created to send them to my Telegram account:

Route::get('/test', function(){
    Telegram::sendVideo('<myId>', '/tmp/1.mov');
    Telegram::sendVideo('<myId>', '/tmp/2.mp4');
    Telegram::sendVideo('<myId>', '/tmp/3.mp4');
});

This is how they all appeared when they arrived on my phone:
1

This is how they looked when I downloaded them - notice no thumbnails:
2

However, if I leave the conversation and return to it they magically appear:
3

However NONE of the videos will play. If I try I get this screen:
4

If I send the videos as a DOCUMENT using this library, everything works perfectly.

If I send the videos via the Telegram app on my phone to another user they all work too.

(This was all prior to the added caption code)

Any thoughts?

@irazasyed
Copy link
Owner

So i just tested this a few times and it seems like some sort of bug on their end, not the library.

Because, I saved the video to the camera roll on iOS and it saved the video just fine and i was able to play it from the Photos app too. However, It didn't play within the Telegram app itself (like you reported).

I also tested this on the Telegram Mac client, The video loads fine including the thumbnail, etc. So it could be bug with Telegram iOS app..not sure how its handling the videos within bots API. (I didn't test with Android though). Maybe you should report this to their support and provide this issue link, Let them take a look as well.

I'll probably do that as well but they don't seem to be responding at all (Still waiting for those 2 other issues, not even opened/seen my messages).

@irazasyed
Copy link
Owner

Response from support:

There is currently a bug in the iOS version, which looks horribly similar to this issue.

Soo.. That might just be it, but.. haven't gotten confirmation from the dev side of the bots yet, which means i'm 50/50 on that ;) as soon as I get a definitive answer on that (or one of my volunteer coworkers) we'll let you know :)

@jonnywilliamson
Copy link
Contributor Author

Its good they got back to you. I had sent a couple of tweets to the @telegram account and pointed to these issues too.

Appreciate the feedback!

@siyanew
Copy link

siyanew commented Apr 9, 2016

Recently Telegram add width and height and duration in its document but videos send with black image preview , I found some videos that sent correctly, I think its about encoding of files.
Did you find anything @jonnywilliamson ?

@dvadvaa
Copy link

dvadvaa commented Jan 4, 2021

The problem still exists!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants