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

video listener bug #38

Closed
ghost opened this issue Apr 13, 2020 · 9 comments
Closed

video listener bug #38

ghost opened this issue Apr 13, 2020 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Apr 13, 2020

Describe the bug
Video tag output is not good, it prints the delta code instead of the html.

The delta code which generates the Problem

Example:

{"insert":{"video":"test.webm"}},

The expected html output the delta should produce

Example:

<div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" src="test.webm" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>

Expected behavior
The html output should bethe one above, instead the delta is the output:

<p style="text-align: center;">{"video":"\/assets\/others\/SvHwb6TvSF1X8Obtq0rcKTk0f7frenDLbQgBRLoV.webm"}</p>

Screenshots
If applicable, add screenshots to help explain your problem.
image

Using "use nadar\quill\listener\Video;" for Video.

@nadar
Copy link
Owner

nadar commented Apr 13, 2020

Could you please post the full quill code?

@nadar nadar self-assigned this Apr 13, 2020
@nadar nadar added the bug Something isn't working label Apr 13, 2020
@ghost
Copy link
Author

ghost commented Apr 13, 2020

The full code is:

namespace App;

use nadar\quill\listener\Video;
use nadar\quill\Lexer;

class Test
{
	public $json;

	public function __construct($json)
	{
		$this->json = $json;
	}

	public function renderQuill()
	{
		$lexer = new Lexer($this->json);

		$lexer->registerListener(new Video);

		return $lexer->render();
	}
}

and the json data:

{"ops":[{"insert":{"image":"/jv7CaXqRgP6asSXFxefAoC8uCJaBfMIuBVeYtqGk.jpeg"}},{"attributes":{"align":"center"},"insert":"\n"},{"insert":"m a neque illo debitis facilis. Rerum error nulla porro non quo."},{"attributes":{"align":"justify"},"insert":"\n\n"},{"attributes":{"align":"center"},"insert":{"video":"/SvHwb6TvSF1X8Obtq0rcKTk0f7frenDLbQgBRLoV.webm"}}]}

@nadar
Copy link
Owner

nadar commented Apr 13, 2020

this should render:

<div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" src="/SvHwb6TvSF1X8Obtq0rcKTk0f7frenDLbQgBRLoV.webm" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>

or what do you expect? the video element just points to an iframe source with default responsive classes from bootstrap.

@ghost
Copy link
Author

ghost commented Apr 13, 2020

It does not render that.

It renders:

<p style="text-align: center;">{"video":"\/assets\/others\/SvHwb6TvSF1X8Obtq0rcKTk0f7frenDLbQgBRLoV.webm"}</p>

@nadar
Copy link
Owner

nadar commented Apr 13, 2020

ok thanks! Please try to remove the align attributes if you are looking for a quick fix. i will do some tests.

@nadar
Copy link
Owner

nadar commented Apr 13, 2020

{"attributes":{"align":"center"},"insert":{"video":"/SvHwb6TvSF1X8Obtq0rcKTk0f7frenDLbQgBRLoV.webm"}}

try this:

{"insert":{"video":"/SvHwb6TvSF1X8Obtq0rcKTk0f7frenDLbQgBRLoV.webm"}}

@ghost
Copy link
Author

ghost commented Apr 13, 2020

It works. Will there be a fix for the attributes?

@nadar
Copy link
Owner

nadar commented Apr 13, 2020

Yes, i will take care of this. As its the same as:

#36
#34

@nadar nadar mentioned this issue Apr 14, 2020
@nadar
Copy link
Owner

nadar commented Sep 14, 2023

4.0 refactor will not happen. Sorry. Quill is abandoned

@nadar nadar closed this as completed Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant